@@ -1,162 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集规则添加 | |||||
* | |||||
* @version $Id: co_add.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('co_AddNote'); | |||||
if (empty($step)) $step = ""; | |||||
if (empty($exrule)) $exrule = ""; | |||||
//选择操作频道类型,载入表单 | |||||
/*---------------------- | |||||
function Init(){ } | |||||
----------------------*/ | |||||
if (empty($step)) { | |||||
require_once(DEDEADMIN . "/templets/co_add_step0.htm"); | |||||
exit(); | |||||
} else if ($step == 1) { | |||||
require_once(DEDEADMIN . "/templets/co_add_step1.htm"); | |||||
exit(); | |||||
} | |||||
//保存索引规则 | |||||
/*---------------------- | |||||
function Save_List(){ } | |||||
----------------------*/ else if ($step == 2) { | |||||
//对完整规则进行测试 | |||||
if ($dopost == 'test') { | |||||
include(DEDEINC . "/dedecollection.class.php"); | |||||
$usemore = (!isset($usemore) ? 0 : 1); | |||||
$listconfig = "{dede:noteinfo notename=\\\"$notename\\\" channelid=\\\"$channelid\\\" macthtype=\\\"$macthtype\\\" | |||||
refurl=\\\"$refurl\\\" sourcelang=\\\"$sourcelang\\\" cosort=\\\"$cosort\\\" isref=\\\"$isref\\\" exptime=\\\"$exptime\\\" usemore=\\\"$usemore\\\" /} | |||||
{dede:listrule sourcetype=\\\"$sourcetype\\\" rssurl=\\\"$rssurl\\\" regxurl=\\\"$regxurl\\\" | |||||
startid=\\\"$startid\\\" endid=\\\"$endid\\\" addv=\\\"$addv\\\" urlrule=\\\"$urlrule\\\" | |||||
musthas=\\\"$musthas\\\" nothas=\\\"$nothas\\\" listpic=\\\"$listpic\\\" usemore=\\\"$usemore\\\"} | |||||
{dede:addurls}$addurls{/dede:addurls} | |||||
{dede:batchrule}$batchrule{/dede:batchrule} | |||||
{dede:regxrule}$regxrule{/dede:regxrule} | |||||
{dede:areastart}$areastart{/dede:areastart} | |||||
{dede:areaend}$areaend{/dede:areaend} | |||||
{/dede:listrule}\r\n"; | |||||
$tmplistconfig = stripslashes($listconfig); | |||||
$notename = stripslashes($notename); | |||||
if ($sourcetype == 'rss' && $refurl = '') { | |||||
$refurl = $rssurl; | |||||
} | |||||
$refurl = stripslashes($refurl); | |||||
$errmsg = ''; | |||||
$freq = empty($freq) ? "" : $freq; | |||||
$extypeid = empty($freq) ? "" : $extypeid; | |||||
//测试规则 | |||||
if ($sourcetype == 'rss') { | |||||
$links = GetRssLinks(stripslashes($rssurl)); | |||||
$demopage = $rssurl; | |||||
} else { | |||||
$links = array(); | |||||
$lists = GetUrlFromListRule($regxurl, stripslashes($addurls), $startid, $endid, $addv, $usemore, stripslashes($batchrule)); | |||||
if (isset($lists[0][0])) { | |||||
$demopage = $lists[0][0]; | |||||
$dc = new DedeCollection(); | |||||
$dc->LoadListConfig($tmplistconfig); | |||||
$listurl = ''; | |||||
$links = $dc->Testlists($listurl); | |||||
$errmsg = $dc->errString; | |||||
} else { | |||||
$demopage = '没有匹配到适合的列表页!'; | |||||
} | |||||
} | |||||
require_once(DEDEADMIN . "/templets/co_add_step1_test.htm"); | |||||
exit(); | |||||
} | |||||
//从预览并提示进入下一步 | |||||
else { | |||||
$row = $dsql->GetOne("SELECT nid,channelid FROM `#@__co_note` WHERE isok=0 AND notename LIKE '$notename' "); | |||||
if (!is_array($row)) { | |||||
$uptime = time(); | |||||
$listconfig = urldecode($listconfig); | |||||
$inquery = " INSERT INTO `#@__co_note`(`channelid`,`notename`,`sourcelang`,`uptime`,`cotime`,`pnum`,`isok`,`usemore`,`listconfig`,`itemconfig`) | |||||
VALUES ('$channelid','$notename','$sourcelang','$uptime','0','0','0','$usemore','$listconfig',''); "; | |||||
$rs = $dsql->ExecuteNoneQuery($inquery); | |||||
if (!$rs) { | |||||
ShowMsg("保存信息时出现错误!" . $dsql->GetError(), "-1"); | |||||
exit(); | |||||
} | |||||
$nid = $dsql->GetLastID(); | |||||
} else { | |||||
$channelid = $row['channelid']; | |||||
$uptime = time(); | |||||
if (empty($freq)) $freq = 1; | |||||
if (empty($extypeid)) $extypeid = 0; | |||||
if (empty($islisten)) $islisten = 0; | |||||
$usemore = (!isset($usemore) ? 0 : 1); | |||||
$query = " UPDATE `#@__co_note` SET | |||||
`channelid`='$channelid', | |||||
`notename`='$notename', | |||||
`sourcelang`='$sourcelang', | |||||
`uptime`='$uptime', | |||||
`isok`='1', | |||||
`usemore`='$usemore', | |||||
`listconfig`='$listconfig' WHERE nid='$nid'; "; | |||||
$dsql->ExecuteNoneQuery($query); | |||||
$nid = $row['nid']; | |||||
} | |||||
if (!isset($previewurl)) $previewurl = ''; | |||||
require_once(DEDEINC . '/dedetag.class.php'); | |||||
require_once(DEDEADMIN . "/templets/co_add_step2.htm"); | |||||
exit(); | |||||
} | |||||
} | |||||
//保存文章规则 | |||||
/*---------------------- | |||||
function Save_Art(){ } | |||||
----------------------*/ else if ($step == 5) { | |||||
/* | |||||
[previewurl] => '' | |||||
*/ | |||||
$itemconfig = "{dede:sppage sptype=\\'$sptype\\' sptype=\\'$sptype\\' srul=\\'$srul\\' erul=\\'$erul\\'}$sppage{/dede:sppage}\r\n"; | |||||
$itemconfig .= "{dede:previewurl}$previewurl{/dede:previewurl}\r\n"; | |||||
$itemconfig .= "{dede:keywordtrim}$keywordtrim{/dede:keywordtrim}\r\n"; | |||||
$itemconfig .= "{dede:descriptiontrim}$descriptiontrim{/dede:descriptiontrim}\r\n"; | |||||
$fs = explode(',', 'value,match,isunit,isdown,trim,function'); | |||||
foreach ($fields as $field) { | |||||
foreach ($fs as $f) { | |||||
$GLOBALS[$f . '_' . $field] = (!isset($GLOBALS[$f . '_' . $field]) ? '' : $GLOBALS[$f . '_' . $field]); | |||||
} | |||||
$matchstr = $GLOBALS["match_" . $field]; | |||||
$trimstr = $GLOBALS["trim_" . $field]; | |||||
$trimstr = trim(str_replace(' ', '#n#', $trimstr)); | |||||
$matchstr = trim(str_replace(' ', '#n#', $matchstr)); | |||||
if ($trimstr != '' && !preg_match("#{dede:trim#i", $trimstr)) { | |||||
$trimstr = " {dede:trim}$trimstr{/dede:trim}\r\n"; | |||||
} | |||||
$itemconfig .= "{dede:item field=\\'" . $field . "\\' value=\\'" . $GLOBALS["value_" . $field] . "\\' isunit=\\'" . $GLOBALS["isunit_" . $field] . "\\' isdown=\\'" . $GLOBALS["isdown_" . $field] . "\\'} | |||||
{dede:match}" . $matchstr . "{/dede:match} | |||||
$trimstr | |||||
{dede:function}" . $GLOBALS["function_" . $field] . "{/dede:function} | |||||
{/dede:item}\r\n"; | |||||
} | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET itemconfig='$itemconfig' WHERE nid='$nid' "); | |||||
//echo $dsql->GetError(); | |||||
require_once(DEDEINC . '/dedecollection.class.php'); | |||||
require_once(DEDEADMIN . "/templets/co_add_step2_test.htm"); | |||||
exit(); | |||||
} else if ($step == 6) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET isok='1' WHERE nid='$nid' "); | |||||
ShowMsg("成功设置一个规则!", "co_main.php"); | |||||
exit(); | |||||
} else if ($step == 7) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET isok='1' WHERE nid='$nid' "); | |||||
ShowMsg("成功设置一个规则,现在转向采集页面!", "co_gather_start.php?nid=$nid"); | |||||
exit(); | |||||
} |
@@ -1,242 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集操作 | |||||
* | |||||
* @version $Id: co_do.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/oxwindow.class.php"); | |||||
if (!isset($nid)) $nid = 0; | |||||
$ENV_GOBACK_URL = empty($_COOKIE["ENV_GOBACK_URL"]) ? "co_url.php" : $_COOKIE["ENV_GOBACK_URL"]; | |||||
//删除节点 | |||||
//删除节点将删除所有旧的网址索引 | |||||
/* | |||||
function co_delete() | |||||
*/ | |||||
if ($dopost == "delete") { | |||||
CheckPurview('co_Del'); | |||||
$nid = intval($nid); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` WHERE nid='$nid'"); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_note` WHERE nid='$nid'"); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_urls` WHERE nid='$nid'"); | |||||
ShowMsg("成功删除一个节点!", "co_main.php"); | |||||
exit(); | |||||
} | |||||
//清空采集内容 | |||||
//清空采集内容时仍会保留旧的网址索引,在监控模式下始终采集新的内容 | |||||
/* | |||||
function url_clear() | |||||
*/ else if ($dopost == "clear") { | |||||
CheckPurview('co_Del'); | |||||
if (!isset($ids)) $ids = ''; | |||||
if (empty($ids)) { | |||||
if (!empty($nid)) { | |||||
$nid = intval($nid); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` WHERE nid='$nid'"); | |||||
} | |||||
ShowMsg("成功清空一个节点采集的内容!", "co_main.php"); | |||||
exit(); | |||||
} else { | |||||
if (!empty($clshash)) { | |||||
$dsql->SetQuery("SELECT nid,url FROM `#@__co_htmls` WHERE aid IN($ids) "); | |||||
$dsql->Execute(); | |||||
while ($arr = $dsql->GetArray()) { | |||||
$nhash = md5($arr['url']); | |||||
$nid = $row['nid']; | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_urls ` WHERE nid='$nid' AND hash='$nhash' "); | |||||
} | |||||
} | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` WHERE aid IN($ids) "); | |||||
ShowMsg("成功删除指定的网址内容!", $ENV_GOBACK_URL); | |||||
exit(); | |||||
} | |||||
} else if ($dopost == "clearct") { | |||||
CheckPurview('co_Del'); | |||||
if (!empty($ids)) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_htmls` SET isdown=0,result='' WHERE aid IN($ids) "); | |||||
} | |||||
ShowMsg("成功清除所有内容!", $ENV_GOBACK_URL); | |||||
exit(); | |||||
} | |||||
/* | |||||
function url_clearall() | |||||
*/ else if ($dopost == "clearall") { | |||||
CheckPurview('co_Del'); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` "); | |||||
ShowMsg("成功清空所有采集的临时内容!", "co_main.php"); | |||||
exit(); | |||||
} | |||||
//内容替换 | |||||
/* | |||||
function co_replace() { } | |||||
*/ else if ($dopost == "replace") { | |||||
//if() | |||||
//$nid $aid $regtype $fdstring $rpstring | |||||
$rpstring = trim($rpstring); | |||||
if ($regtype == 'string') { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_htmls` SET `result`=REPLACE(`result`,'$fdstring','$rpstring') WHERE nid='$nid' "); | |||||
} else { | |||||
//返回一条测试结果,并要求用户确认操作 | |||||
if (empty($rpok)) { | |||||
$fdstring = stripslashes($fdstring); | |||||
$rpstring = stripslashes($rpstring); | |||||
$hiddenrpvalue = "<textarea name='fdstring' style='display:none'>{$fdstring}</textarea>\r\n<textarea name='rpstring' style='display:none'>{$rpstring}</textarea>\r\n"; | |||||
$fdstring = str_replace("\\/", "#ASZZ#", $fdstring); | |||||
$fdstring = str_replace('/', "\\/", $fdstring); | |||||
$fdstring = str_replace('#ASZZ#', "\\/", $fdstring); | |||||
$result = $rs = stripslashes($rs); | |||||
if ($fdstring != '') { | |||||
$result = trim(preg_replace("/$fdstring/isU", $rpstring, $rs)); | |||||
} | |||||
$wintitle = "采集管理-内容替换"; | |||||
$wecome_info = "<a href='co_main.php'>采集管理</a>::内容替换"; | |||||
$win = new OxWindow(); | |||||
$win->Init("co_do.php", "js/blank.js", "POST"); | |||||
$win->AddHidden('dopost', $dopost); | |||||
$win->AddHidden('nid', $nid); | |||||
$win->AddHidden('regtype', 'regex'); | |||||
$win->AddHidden('aid', $aid); | |||||
$win->AddHidden('rpok', 'ok'); | |||||
$win->AddTitle("内容替换操作确认:如果下面结果正确,点击确认,系统将替换当前节点所有内容!{$hiddenrpvalue}"); | |||||
$win->AddItem("原来的内容:", "<textarea name='rs' style='width:90%;height:250px'>{$rs}</textarea>\r\n"); | |||||
$win->AddItem("按规则替换后的内容:", "<textarea name='okrs' style='width:90%;height:250px'>{$result}</textarea>\r\n"); | |||||
$winform = $win->GetWindow("ok"); | |||||
$win->Display(); | |||||
exit(); | |||||
} else { | |||||
if ($fdstring != '') { | |||||
$dsql->SetQuery("SELECT `aid`,`result` FROM `#@__co_htmls` WHERE nid='$nid' "); | |||||
$dsql->Execute(); | |||||
while ($row = $dsql->GetArray()) { | |||||
$fdstring = stripslashes($fdstring); | |||||
$rpstring = stripslashes($rpstring); | |||||
$fdstring = str_replace("\\/", "#ASZZ#", $fdstring); | |||||
$fdstring = str_replace('/', "\\/", $fdstring); | |||||
$fdstring = str_replace('#ASZZ#', "\\/", $fdstring); | |||||
$result = trim(preg_replace("/$fdstring/isU", $rpstring, $row['result'])); | |||||
$result = addslashes($result); | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_htmls` SET `result`='$result' WHERE aid='{$row['aid']}' "); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
ShowMsg("成功替换当前节点所有数据!", "co_view.php?aid=$aid"); | |||||
exit(); | |||||
} | |||||
//复制节点 | |||||
/* | |||||
function co_copy() | |||||
*/ else if ($dopost == "copy") { | |||||
CheckPurview('co_AddNote'); | |||||
if (empty($mynotename)) { | |||||
$wintitle = "采集管理-复制节点"; | |||||
$wecome_info = "<a href='co_main.php'>采集管理</a>::复制节点"; | |||||
$win = new OxWindow(); | |||||
$win->Init("co_do.php", "js/blank.js", "POST"); | |||||
$win->AddHidden("dopost", $dopost); | |||||
$win->AddHidden("nid", $nid); | |||||
$win->AddTitle("请输入新节点名称:"); | |||||
$win->AddItem("新节点名称:", "<input type='text' name='mynotename' value='' size='30' />"); | |||||
$winform = $win->GetWindow("ok"); | |||||
$win->Display(); | |||||
exit(); | |||||
} | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__co_note` WHERE nid='$nid'"); | |||||
foreach ($row as $k => $v) { | |||||
if (!isset($$k)) { | |||||
$$k = addslashes($v); | |||||
} | |||||
} | |||||
$usemore = (empty($usemore) ? '0' : $usemore); | |||||
$inQuery = " INSERT INTO `#@__co_note`(`channelid`,`notename`,`sourcelang`,`uptime`,`cotime`,`pnum`,`isok`,`listconfig`,`itemconfig`,`usemore`) | |||||
VALUES ('$channelid','$mynotename','$sourcelang','" . time() . "','0','0','0','$listconfig','$itemconfig','$usemore'); "; | |||||
$dsql->ExecuteNoneQuery($inQuery); | |||||
ShowMsg("成功复制一个节点!", $ENV_GOBACK_URL); | |||||
exit(); | |||||
} | |||||
//测试Rss源是否正确 | |||||
/*----------------------- | |||||
function co_testrss() | |||||
-------------------------*/ else if ($dopost == "testrss") { | |||||
CheckPurview('co_AddNote'); | |||||
$msg = ''; | |||||
if ($rssurl == '') { | |||||
$msg = '你没有指定RSS地址!'; | |||||
} else { | |||||
include(DEDEINC . "/dedecollection.func.php"); | |||||
$arr = GetRssLinks($rssurl); | |||||
$msg = "从 {$rssurl} 发现的网址:<br />"; | |||||
$i = 1; | |||||
if (is_array($arr)) { | |||||
foreach ($arr as $ar) { | |||||
$msg .= "<hr size='1' />\r\n"; | |||||
$msg .= "link: {$ar['link']}<br />title: {$ar['title']}<br />image: {$ar['image']}\r\n"; | |||||
$i++; | |||||
} | |||||
} | |||||
} | |||||
$wintitle = "采集管理-测试"; | |||||
$wecome_info = "<a href='co_main.php'>采集管理</a>::RSS地址测试"; | |||||
$win = new OxWindow(); | |||||
$win->AddMsgItem($msg); | |||||
$winform = $win->GetWindow("hand"); | |||||
$win->Display(); | |||||
exit(); | |||||
} | |||||
//测试批量网址是否正确 | |||||
/*----------------------- | |||||
function co_testregx() | |||||
-------------------------*/ else if ($dopost == "testregx") { | |||||
CheckPurview('co_AddNote'); | |||||
$msg = ''; | |||||
if ($regxurl == '') { | |||||
$msg = '你没有指定匹配的网址!'; | |||||
} else { | |||||
include(DEDEINC . "/dedecollection.func.php"); | |||||
$msg = "匹配的网址:<br />"; | |||||
$lists = GetUrlFromListRule($regxurl, '', $startid, $endid, $addv); | |||||
foreach ($lists as $surl) { | |||||
$msg .= $surl[0] . "<br />\r\n"; | |||||
} | |||||
} | |||||
$wintitle = "采集管理-测试匹配规则"; | |||||
$wecome_info = "<a href='co_main.php'>采集管理</a>::测试匹配列表网址规则"; | |||||
$win = new OxWindow(); | |||||
$win->AddMsgItem($msg); | |||||
$winform = $win->GetWindow("hand"); | |||||
$win->Display(); | |||||
exit(); | |||||
} | |||||
//采集未下载内容 | |||||
/*-------------------- | |||||
function co_all() | |||||
---------------------*/ else if ($dopost == "coall") { | |||||
CheckPurview('co_PlayNote'); | |||||
$mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` "); | |||||
$totalnum = $mrow['dd']; | |||||
if ($totalnum == 0) { | |||||
ShowMsg("没发现可下载的内容!", "-1"); | |||||
exit(); | |||||
} | |||||
$wintitle = "采集管理-采集未下载内容"; | |||||
$wecome_info = "<a href='co_main.php'>采集管理</a>::采集未下载内容"; | |||||
$win = new OxWindow(); | |||||
$win->Init("co_gather_start_action.php", "js/blank.js", "GET"); | |||||
$win->AddHidden('startdd', '0'); | |||||
$win->AddHidden('pagesize', '5'); | |||||
$win->AddHidden('sptime', '0'); | |||||
$win->AddHidden('nid', '0'); | |||||
$win->AddHidden('totalnum', $totalnum); | |||||
$win->AddMsgItem("本操作会检测并下载‘<a href='co_url.php'><u>临时内容</u></a>’中所有未下载的内容,是否继续?"); | |||||
$winform = $win->GetWindow("ok"); | |||||
$win->Display(); | |||||
exit(); | |||||
} |
@@ -1,144 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集规则编辑 | |||||
* | |||||
* @version $Id: co_edit.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
CheckPurview('co_EditNote'); | |||||
require_once(DEDEINC . '/dedetag.class.php'); | |||||
$nid = (isset($nid) ? intval($nid) : ''); | |||||
if ($nid == '') { | |||||
ShowMsg('参数无效!', '-1'); | |||||
exit(); | |||||
} | |||||
if (empty($dopost)) $dopost = ''; | |||||
/*---------------------- | |||||
function _Save() | |||||
----------------------*/ | |||||
if ($dopost == 'save' || $dopost == 'saveandtest') { | |||||
$usemore = (!isset($usemore) ? 0 : 1); | |||||
$listconfig = "{dede:noteinfo notename=\\\"$notename\\\" channelid=\\\"$channelid\\\" macthtype=\\\"$macthtype\\\" | |||||
refurl=\\\"$refurl\\\" sourcelang=\\\"$sourcelang\\\" cosort=\\\"$cosort\\\" | |||||
isref=\\\"$isref\\\" exptime=\\\"$exptime\\\" usemore=\\\"$usemore\\\" /} | |||||
{dede:listrule sourcetype=\\\"$sourcetype\\\" rssurl=\\\"$rssurl\\\" regxurl=\\\"$regxurl\\\" | |||||
startid=\\\"$startid\\\" endid=\\\"$endid\\\" addv=\\\"$addv\\\" urlrule=\\\"$urlrule\\\" musthas=\\\"$musthas\\\" | |||||
nothas=\\\"$nothas\\\" listpic=\\\"$listpic\\\" usemore=\\\"$usemore\\\"} | |||||
{dede:addurls}$addurls{/dede:addurls} | |||||
{dede:batchrule}$batchrule{/dede:batchrule} | |||||
{dede:regxrule}$regxrule{/dede:regxrule} | |||||
{dede:areastart}$areastart{/dede:areastart} | |||||
{dede:areaend}$areaend{/dede:areaend} | |||||
{/dede:listrule}\r\n"; | |||||
$itemconfig = "{dede:sppage sptype=\\'$sptype\\' srul=\\'$srul\\' erul=\\'$erul\\'}$sppage{/dede:sppage}\r\n"; | |||||
$itemconfig .= "{dede:previewurl}$previewurl{/dede:previewurl}\r\n"; | |||||
$itemconfig .= "{dede:keywordtrim}$keywordtrim{/dede:keywordtrim}\r\n"; | |||||
$itemconfig .= "{dede:descriptiontrim}$descriptiontrim{/dede:descriptiontrim}\r\n"; | |||||
$fs = explode(',', 'value,match,isunit,isdown,trim,function'); | |||||
foreach ($fields as $field) { | |||||
foreach ($fs as $f) { | |||||
$GLOBALS[$f . '_' . $field] = (!isset($GLOBALS[$f . '_' . $field]) ? '' : $GLOBALS[$f . '_' . $field]); | |||||
} | |||||
$matchstr = $GLOBALS["match_" . $field]; | |||||
$trimstr = $GLOBALS["trim_" . $field]; | |||||
$trimstr = trim(str_replace(' ', '#n#', $trimstr)); | |||||
$matchstr = trim(str_replace(' ', '#n#', $matchstr)); | |||||
if ($trimstr != '' && !preg_match("#{dede:trim#isU", $trimstr)) { | |||||
$trimstr = " {dede:trim}$trimstr{/dede:trim}\r\n"; | |||||
} | |||||
$itemconfig .= "{dede:item field=\\'" . $field . "\\' value=\\'" . $GLOBALS["value_" . $field] . "\\' isunit=\\'" . $GLOBALS["isunit_" . $field] . "\\' isdown=\\'" . $GLOBALS["isdown_" . $field] . "\\'} | |||||
{dede:match}" . $matchstr . "{/dede:match} | |||||
$trimstr | |||||
{dede:function}" . $GLOBALS["function_" . $field] . "{/dede:function} | |||||
{/dede:item}"; | |||||
} | |||||
$uptime = time(); | |||||
if (empty($freq)) $freq = 1; | |||||
if (empty($extypeid)) $extypeid = 0; | |||||
if (empty($islisten)) $islisten = 0; | |||||
$query = " UPDATE `#@__co_note` SET | |||||
`channelid`='$channelid', | |||||
`notename`='$notename', | |||||
`sourcelang`='$sourcelang', | |||||
`uptime`='$uptime', | |||||
`isok`='1', | |||||
`usemore`='$usemore', | |||||
`listconfig`='$listconfig', | |||||
`itemconfig`='$itemconfig' | |||||
WHERE nid='$nid'; "; | |||||
$rs = $dsql->ExecuteNoneQuery($query); | |||||
echo $dsql->GetError(); | |||||
if ($donext == 'save') { | |||||
ShowMsg("成功保存配置!", "co_main.php"); | |||||
} else { | |||||
require_once(dirname(__FILE__) . "/co_test_rule.php"); | |||||
} | |||||
exit(); | |||||
} | |||||
$arr = $dsql->GetOne("SELECT * FROM `#@__co_note` WHERE nid='$nid'"); | |||||
//如果内容规则未设置,转到设置内容规则的表单 | |||||
if (trim($arr['itemconfig']) == '') { | |||||
$channelid = $arr['channelid']; | |||||
$nid = $arr['nid']; | |||||
if (!isset($previewurl)) $previewurl = ''; | |||||
require_once(DEDEINC . '/dedetag.class.php'); | |||||
require_once(DEDEADMIN . "/templets/co_add_step2.htm"); | |||||
exit(); | |||||
} | |||||
$usemore = $arr['usemore']; | |||||
$notename = $arr['notename']; | |||||
$notes = array(); | |||||
$dsql->FreeResult(); | |||||
$dtp = new DedeTagParse(); | |||||
$dtp2 = new DedeTagParse(); | |||||
$dtp->LoadString($arr['listconfig'] . $arr['itemconfig']); | |||||
$channelid = $arr['channelid']; | |||||
$notes['keywordtrim'] = ''; | |||||
$notes['descriptiontrim'] = ''; | |||||
foreach ($dtp->CTags as $tid => $ctag) { | |||||
if ($ctag->GetName() == 'item') { | |||||
$f = $ctag->GetAtt('field'); | |||||
$notes[$f]['item'] = $ctag; | |||||
$dtp2->LoadString($ctag->GetInnerText()); | |||||
$notes[$f]['trim'] = ''; | |||||
foreach ($dtp2->CTags as $ctag2) { | |||||
if ($ctag2->GetName() == 'trim') { | |||||
$notes[$f]['trim'] .= "{dede:trim replace=\"" . $ctag2->GetAtt('replace') . "\"}" . $ctag2->GetInnerText() . "{/dede:trim}\r\n"; | |||||
} else if ($ctag2->GetName() == 'match') { | |||||
$notes[$f]['match'] = $ctag2->GetInnerText() . "\r\n"; | |||||
} else if ($ctag2->GetName() == 'function') { | |||||
$notes[$f]['function'] = $ctag2->GetInnerText() . "\r\n"; | |||||
} | |||||
} | |||||
} else if ($ctag->GetName() == 'keywordtrim') { | |||||
$notes['keywordtrim'] = $ctag->GetInnerText(); | |||||
} else if ($ctag->GetName() == 'descriptiontrim') { | |||||
$notes['descriptiontrim'] = $ctag->GetInnerText(); | |||||
} else if ($ctag->GetName() == 'noteinfo') { | |||||
$noteinfo = $ctag; | |||||
} else if ($ctag->GetName() == 'listrule') { | |||||
$listrule = $ctag; | |||||
$dtp2->LoadString($ctag->GetInnerText()); | |||||
$addurls = $dtp2->GetTagByName('addurls'); | |||||
$regxrule = $dtp2->GetTagByName('regxrule'); | |||||
$areastart = $dtp2->GetTagByName('areastart'); | |||||
$areaend = $dtp2->GetTagByName('areaend'); | |||||
$batchrule = $dtp2->GetTagByName('batchrule'); | |||||
} else if ($ctag->GetName() == 'sppage') { | |||||
$sppage = $ctag; | |||||
} else if ($ctag->GetName() == 'previewurl') { | |||||
$previewurl = trim($ctag->GetInnerText()); | |||||
} | |||||
} | |||||
if (!isset($previewurl)) $previewurl = ''; | |||||
require_once(DEDEADMIN . '/templets/co_edit.htm'); |
@@ -1,38 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集规则编辑-专家更改模式 | |||||
* | |||||
* @version $Id: co_edit_text.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('co_EditNote'); | |||||
if (empty($job)) $job = ''; | |||||
if ($job == '') { | |||||
require_once(DEDEINC . "/oxwindow.class.php"); | |||||
$wintitle = "更改采集规则"; | |||||
$wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::更改采集规则 - 专家更改模式"; | |||||
$win = new OxWindow(); | |||||
$win->Init("co_edit_text.php", "js/blank.js", "POST"); | |||||
$win->AddHidden("job", "yes"); | |||||
$win->AddHidden("nid", $nid); | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__co_note` WHERE nid='$nid' "); | |||||
$win->AddTitle("索引与基本信息配置:"); | |||||
$win->AddMsgItem("<textarea name='listconfig' style='width:100%;height:200px'>{$row['listconfig']}</textarea>"); | |||||
$win->AddTitle("字段配置:"); | |||||
$win->AddMsgItem("<textarea name='itemconfig' style='width:100%;height:300px'>{$row['itemconfig']}</textarea>"); | |||||
$winform = $win->GetWindow("ok"); | |||||
$win->Display(); | |||||
exit(); | |||||
} else { | |||||
CheckPurview('co_EditNote'); | |||||
$query = "UPDATE `#@__co_note` SET listconfig='$listconfig',itemconfig='$itemconfig' WHERE nid='$nid' "; | |||||
$rs = $dsql->ExecuteNoneQuery($query); | |||||
ShowMsg("成功修改一个规则!", "co_main.php"); | |||||
exit(); | |||||
} |
@@ -1,248 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 导出采集规则 | |||||
* | |||||
* @version $Id: co_edit_text.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('co_Export'); | |||||
if (empty($dopost)) $dopost = ''; | |||||
if ($dopost != 'done') { | |||||
require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||||
$totalcc = $channelid = $usemore = 0; | |||||
if (!empty($nid)) { | |||||
$mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE nid='$nid' AND isdown='1' "); | |||||
$totalcc = $mrow['dd']; | |||||
$rrow = $dsql->GetOne("SELECT channelid,usemore FROM `#@__co_note` WHERE nid='$nid' "); | |||||
$channelid = $rrow['channelid']; | |||||
$usemore = $rrow['usemore']; | |||||
} else { | |||||
$mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE isdown='1' "); | |||||
$totalcc = $mrow['dd']; | |||||
} | |||||
include DedeInclude("templets/co_export.htm"); | |||||
exit(); | |||||
} else { | |||||
require_once(DEDEINC . '/dedecollection.class.php'); | |||||
$channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 0; | |||||
$typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; | |||||
$pageno = isset($pageno) && is_numeric($pageno) ? $pageno : 1; | |||||
$startid = isset($startid) && is_numeric($startid) ? $startid : 0; | |||||
$endid = isset($endid) && is_numeric($endid) ? $endid : 0; | |||||
if (!isset($makehtml)) $makehtml = 0; | |||||
if (!isset($onlytitle)) $onlytitle = 0; | |||||
if (!isset($usetitle)) $usetitle = 0; | |||||
if (!isset($autotype)) $autotype = 0; | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
$orderway = (($co->noteInfos['cosort'] == 'desc' || $co->noteInfos['cosort'] == 'asc') ? $co->noteInfos['cosort'] : 'desc'); | |||||
if ($channelid == 0 && $typeid == 0) { | |||||
ShowMsg('请指定默认导出栏目或频道ID!', 'javascript:;'); | |||||
exit(); | |||||
} | |||||
if ($channelid == 0) { | |||||
$row = $dsql->GetOne("SELECT ch.* FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$typeid'; "); | |||||
} else { | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$channelid'; "); | |||||
} | |||||
if (!is_array($row)) { | |||||
echo "找不到频道内容模型信息,无法完成操作!"; | |||||
exit(); | |||||
} | |||||
//分析规则,并生成临时的SQL语句 | |||||
$channelid = $row['id']; | |||||
$maintable = $row['maintable']; | |||||
$addtable = $row['addtable']; | |||||
if (empty($maintable)) $maintable = '#@__archives'; | |||||
if (empty($addtable)) { | |||||
echo "找不主表配置信息,无法完成操作!"; | |||||
exit(); | |||||
} | |||||
$adminid = $cuserLogin->getUserID(); | |||||
//微索引表 | |||||
$indexSqlTemplate = "INSERT INTO `#@__arctiny`(`arcrank`,`typeid`,`channel`,`senddate`,`sortrank`) VALUES ('$arcrank','@typeid@' ,'$channelid','@senddate@', '@sortrank@'); "; | |||||
//基本信息主表 | |||||
$mainSqlTemplate = "INSERT INTO `$maintable`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,description,keywords) | |||||
VALUES ('@aid@','@typeid@','@sortrank@','@flag@','0','$channelid','$arcrank','0','0','@title@','','','@writer@','@source@','@litpic@','@pubdate@','@senddate@','$adminid','@description@','@keywords@'); "; | |||||
//生成附加表插入的SQL语句 | |||||
$inadd_f = $inadd_v = ''; | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace('field', '<', '>'); | |||||
$dtp->LoadString($row['fieldset']); | |||||
foreach ($dtp->CTags as $ctag) { | |||||
$tname = $ctag->GetTagName(); | |||||
$inadd_f .= ",`$tname`"; | |||||
$notsend = $ctag->GetAtt('notsend'); | |||||
$fieldtype = $ctag->GetAtt('type'); | |||||
if ($notsend == 1) { | |||||
//对不同类型设置默认值 | |||||
if ($ctag->GetAtt('default') != '') { | |||||
$dfvalue = $ctag->GetAtt('default'); | |||||
} else if ($fieldtype == 'int' || $fieldtype == 'float' || $fieldtype == 'number') { | |||||
$dfvalue = '0'; | |||||
} else if ($fieldtype == 'dtime') { | |||||
$dfvalue = time(); | |||||
} else { | |||||
$dfvalue = ''; | |||||
} | |||||
$inadd_v .= ",'$dfvalue'"; | |||||
} else { | |||||
$inadd_v .= ",'@$tname@'"; | |||||
} | |||||
} | |||||
$addSqlTemplate = "INSERT INTO `{$addtable}`(`aid`,`typeid`{$inadd_f}) Values('@aid@','@typeid@'{$inadd_v})"; | |||||
//导出数据的SQL操作 | |||||
$dtp = new DedeTagParse(); | |||||
$totalpage = $totalcc / $pagesize; | |||||
$startdd = ($pageno - 1) * $pagesize; | |||||
if (!empty($nid)) { | |||||
$dsql->SetQuery("SELECT * FROM `#@__co_htmls` WHERE nid='$nid' AND isdown='1' ORDER BY aid $orderway LIMIT $startdd,$pagesize"); | |||||
} else { | |||||
$dsql->SetQuery("SELECT * FROM `#@__co_htmls` WHERE isdown='1' ORDER BY aid $orderway LIMIT $startdd,$pagesize"); | |||||
} | |||||
$dsql->Execute(); | |||||
while ($row = $dsql->GetObject()) { | |||||
if (trim($row->result == '')) continue; | |||||
//$addSqlTemplate,$mainSqlTemplate,$indexSqlTemplate | |||||
$ntypeid = ($autotype == 1 && $row->typeid != 0) ? $row->typeid : $typeid; | |||||
$indexSql = str_replace('@typeid@', $ntypeid, $indexSqlTemplate); | |||||
$mainSql = str_replace('@typeid@', $ntypeid, $mainSqlTemplate); | |||||
$addSql = str_replace('@typeid@', $ntypeid, $addSqlTemplate); | |||||
$dtp->LoadString($row->result); | |||||
$exid = $row->aid; | |||||
if (!is_array($dtp->CTags)) continue; | |||||
//获取时间和标题 | |||||
$pubdate = $sortrank = time(); | |||||
$title = $row->title; | |||||
$litpic = ''; | |||||
foreach ($dtp->CTags as $ctag) { | |||||
$itemName = $ctag->GetAtt('name'); | |||||
if ($itemName == 'title' && $usetitle == 0) { | |||||
$title = trim($ctag->GetInnerText()); | |||||
if ($title == '') { | |||||
$title = $row->title; | |||||
} | |||||
} else if ($itemName == 'pubdate') { | |||||
$pubdate = trim($ctag->GetInnerText()); | |||||
if (preg_match("#[^0-9]#", $pubdate)) { | |||||
$pubdate = $sortrank = GetMkTime($pubdate); | |||||
} else { | |||||
$pubdate = $sortrank = time(); | |||||
} | |||||
} else if ($itemName == 'litpic') { | |||||
$litpic = trim($ctag->GetInnerText()); | |||||
} | |||||
} | |||||
//检测重复标题 | |||||
$title = addslashes($title); | |||||
if ($onlytitle) { | |||||
$testrow = $dsql->GetOne("SELECT COUNT(ID) AS dd FROM `$maintable` WHERE title LIKE '$title'"); | |||||
if ($testrow['dd'] > 0) { | |||||
echo "数据库已存在标题为: {$title} 的文档,程序阻止了此本条内容导入<br />\r\n"; | |||||
continue; | |||||
} | |||||
} | |||||
//替换固定的项目 | |||||
$senddate = time(); | |||||
$flag = ''; | |||||
if ($litpic != '') $flag = 'p'; | |||||
//随机推荐 | |||||
if ($randcc > 0) { | |||||
$rflag = mt_rand(1, $randcc); | |||||
if ($rflag == $randcc) { | |||||
$flag = ($flag == '' ? 'c' : $flag . ',c'); | |||||
} | |||||
} | |||||
$indexSql = str_replace('@senddate@', $senddate, $indexSql); | |||||
$indexSql = str_replace('@sortrank@', $sortrank, $indexSql); | |||||
$mainSql = str_replace('@flag@', $flag, $mainSql); | |||||
$mainSql = str_replace('@sortrank@', $sortrank, $mainSql); | |||||
$mainSql = str_replace('@pubdate@', $pubdate, $mainSql); | |||||
$mainSql = str_replace('@senddate@', $senddate, $mainSql); | |||||
$mainSql = str_replace('@title@', cn_substr($title, $cfg_title_maxlen), $mainSql); | |||||
//$mainSql = str_replace('@title@', cn_substr($title, 60), $mainSql); 原来的语句,采集的文章导出到栏目后标题不全 | |||||
$addSql = str_replace('@sortrank@', $sortrank, $addSql); | |||||
$addSql = str_replace('@senddate@', $senddate, $addSql); | |||||
//替换模型里的其它字段 | |||||
foreach ($dtp->CTags as $ctag) { | |||||
if ($ctag->GetName() != 'field') { | |||||
continue; | |||||
} | |||||
$itemname = $ctag->GetAtt('name'); | |||||
$itemvalue = addslashes(trim($ctag->GetInnerText())); | |||||
$mainSql = str_replace("@$itemname@", $itemvalue, $mainSql); | |||||
$addSql = str_replace("@$itemname@", $itemvalue, $addSql); | |||||
} | |||||
//插入数据库 | |||||
$rs = $dsql->ExecuteNoneQuery($indexSql); | |||||
if ($rs) { | |||||
$aid = $dsql->GetLastID(); | |||||
$mainSql = str_replace('@aid@', $aid, $mainSql); | |||||
$addSql = str_replace('@aid@', $aid, $addSql); | |||||
$mainSql = preg_replace("#@([a-z0-9]{1,})@#", '', $mainSql); | |||||
$addSql = preg_replace("#@([a-z0-9]{1,})@#", '', $addSql); | |||||
$rs = $dsql->ExecuteNoneQuery($mainSql); | |||||
if (!$rs) { | |||||
echo "导入 '$title' 时错误:" . $dsql->GetError() . "<br />"; | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$aid' "); | |||||
} else { | |||||
$rs = $dsql->ExecuteNoneQuery($addSql); | |||||
if (!$rs) { | |||||
echo "导入 '$title' 时错误:" . $dsql->GetError() . "<br />"; | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$aid' "); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `$maintable` WHERE id='$aid' "); | |||||
} | |||||
} | |||||
} | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_htmls` SET isexport=1 WHERE aid='$exid' "); | |||||
} | |||||
//检测是否完成或后续操作 | |||||
if ($totalpage <= $pageno) { | |||||
if ($channelid > 0 && $makehtml == 1) { | |||||
if ($autotype == 0 && !empty($nid)) { | |||||
$mhtml = "makehtml_archives_action.php?typeid=$typeid&startid=$startid&endid=$endid&pagesize=20"; | |||||
ShowMsg("完成数据导入,准备生成文档HTML...", $mhtml); | |||||
exit(); | |||||
} else { | |||||
ShowMsg("完成所有数据导入,请手工更新HTML!", "javascript:;"); | |||||
exit(); | |||||
} | |||||
} else { | |||||
ShowMsg("完成所有数据导入!", "javascript:;"); | |||||
exit(); | |||||
} | |||||
} else { | |||||
if ($totalpage > 0) { | |||||
$rs = substr(($pageno / $totalpage * 100), 0, 2); | |||||
} else { | |||||
$rs = 100; | |||||
} | |||||
$pageno++; | |||||
$gourl = "co_export.php?dopost=done&nid=$nid&totalcc=$totalcc&channelid=$channelid&pageno=$pageno"; | |||||
$gourl .= "&nid=$nid&typeid=$typeid&autotype=$autotype&arcrank=$arcrank&pagesize=$pagesize&randcc=$randcc"; | |||||
$gourl .= "&startid=$startid&endid=$endid&onlytitle=$onlytitle&usetitle=$usetitle&makehtml=$makehtml"; | |||||
ShowMsg("完成 {$rs}% 导入,继续执行操作...", $gourl, '', 500); | |||||
exit(); | |||||
} | |||||
} |
@@ -1,34 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 导出采集规则 | |||||
* 统一转换为unicode编码然后再base64加密 | |||||
* | |||||
* @version $Id: co_export_corule.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('co_EditNote'); | |||||
require_once(DEDEINC."/oxwindow.class.php"); | |||||
$nid = preg_replace('/[^0-9]/','',$nid); | |||||
$row = $dsql->GetOne("Select * From `#@__co_note` where nid='$nid'"); | |||||
$noteconfig = "{dede:listconfig}\r\n".$row['listconfig']."\r\n{/dede:listconfig}\r\n\r\n"; | |||||
$noteconfig .= "{dede:itemconfig}\r\n".$row['itemconfig']."\r\n{/dede:itemconfig}"; | |||||
if(empty($extype) || $extype=='base64') | |||||
{ | |||||
$noteconfig = "BASE64:".base64_encode($noteconfig).":END"; | |||||
$exmsg = " <a href='co_export_corule.php?nid={$nid}&extype=text'>【导出为普通格式】</a> "; | |||||
} | |||||
else | |||||
{ | |||||
$exmsg = " <a href='co_export_corule.php?nid={$nid}&extype=base64'>【导出为Base64格式】</a> "; | |||||
} | |||||
$wintitle = "导出采集规则"; | |||||
$wecome_info = "<a href='co_main.php'><u>采集节点管理</u></a>::导出采集规则 $exmsg"; | |||||
$win = new OxWindow(); | |||||
$win->Init(); | |||||
$win->AddTitle("以下为规则 [{$row['notename']}] 的文本配置,你可以共享给你的朋友:"); | |||||
$winform = $win->GetWindow("hand","<textarea name='config' style='width:100%;height:450px;word-wrap: break-word;word-break:break-all;'>".$noteconfig."</textarea>"); | |||||
$win->Display(); |
@@ -1,31 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集指定节点 | |||||
* | |||||
* @version $Id: co_gather_start.php$ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/dedecollection.class.php"); | |||||
if (!empty($nid)) { | |||||
$ntitle = '采集指定节点:'; | |||||
$nid = intval($nid); | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
$row = $dsql->GetOne("SELECT COUNT(aid) AS dd FROM `#@__co_htmls` WHERE nid='$nid'; "); | |||||
if ($row['dd'] == 0) { | |||||
$unum = "没有记录或从来没有采集过这个节点!"; | |||||
} else { | |||||
$unum = "共有 {$row['dd']} 个历史种子网址!<a href='javascript:SubmitNew();'>[<u>更新种子网址,并采集</u>]</a>"; | |||||
} | |||||
} else { | |||||
$nid = ""; | |||||
$row['dd'] = ""; | |||||
$ntitle = '监控式采集:'; | |||||
$unum = "没指定采集节点,将使用检测新内容采集模式!"; | |||||
} | |||||
include DedeInclude('templets/co_gather_start.htm'); |
@@ -1,71 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 开始采集指定节点操作 | |||||
* | |||||
* @version $Id: co_gather_start_action.php$ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('co_PlayNote'); | |||||
require_once(DEDEINC . '/dedecollection.class.php'); | |||||
if ($totalnum == 0) { | |||||
ShowMsg('获取到的网址为零:可能是规则不对或没发现新内容!', 'javascript:;'); | |||||
exit(); | |||||
} | |||||
if (!isset($oldstart)) $oldstart = $startdd; | |||||
if (empty($notckpic)) $notckpic = 0; | |||||
if ($totalnum > $startdd + $pagesize) $limitSql = " LIMIT $startdd,$pagesize "; | |||||
else $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); | |||||
if ($totalnum - $startdd < 1) { | |||||
if (empty($nid)) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET cotime='" . time() . "'; "); | |||||
} else { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET cotime='" . time() . "' WHERE nid='$nid'; "); | |||||
} | |||||
ShowMsg('完成当前下载任务!', 'javascript:;'); | |||||
exit(); | |||||
} | |||||
$co = new DedeCollection(); | |||||
if (!empty($nid)) $co->LoadNote($nid); | |||||
//没指定采集ID时下载所有内容 | |||||
if (!empty($nid)) { | |||||
$dsql->SetQuery("SELECT aid,nid,url,isdown,litpic FROM `#@__co_htmls` WHERE nid=$nid $limitSql "); | |||||
} else { | |||||
$dsql->SetQuery("SELECT aid,nid,url,isdown,litpic FROM `#@__co_htmls` $limitSql "); | |||||
} | |||||
$dsql->Execute(99); | |||||
$tjnum = $startdd; | |||||
while ($row = $dsql->GetObject(99)) { | |||||
if ($row->isdown == 0) { | |||||
if (empty($nid)) $co->LoadNote($row->nid); | |||||
$co->DownUrl($row->aid, $row->url, $row->litpic); | |||||
} | |||||
$tjnum++; | |||||
if ($sptime > 0) sleep($sptime); | |||||
} | |||||
if ($totalnum - $oldstart != 0) { | |||||
$tjlen = ceil((($tjnum - $oldstart) / ($totalnum - $oldstart)) * 100); | |||||
$dvlen = $tjlen * 2; | |||||
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>"; | |||||
$tjsta .= "<br/>完成当前任务的:$tjlen %,继续执行任务..."; | |||||
} | |||||
if ($tjnum < $totalnum) { | |||||
ShowMsg($tjsta, "co_gather_start_action.php?notckpic=$notckpic&sptime=$sptime&nid=$nid&oldstart=$oldstart&totalnum=$totalnum&startdd=" . ($startdd + $pagesize) . "&pagesize=$pagesize", "", 0); | |||||
exit(); | |||||
} else { | |||||
if (empty($nid)) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET cotime='" . time() . "'; "); | |||||
} else { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_note` SET cotime='" . time() . "' WHERE nid='$nid'; "); | |||||
} | |||||
ShowMsg("完成当前下载任务!", "javascript:;"); | |||||
exit(); | |||||
} |
@@ -1,99 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 导入采集规则 | |||||
* | |||||
* @version $Id: co_get_corule.php 1 17:13 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('co_AddNote'); | |||||
if(empty($job)) | |||||
{ | |||||
$job=''; | |||||
} | |||||
if($job=='') | |||||
{ | |||||
require_once(DEDEINC."/../include/oxwindow.class.php"); | |||||
$wintitle = "导入采集规则"; | |||||
$wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::导入采集规则"; | |||||
$win = new OxWindow(); | |||||
$win->Init("co_get_corule.php","js/blank.js","POST"); | |||||
$win->AddHidden("job","yes"); | |||||
$win->AddTitle("请在下面输入你要导入的文本配置:(建议用base64编码[支持不编码的规则,但不兼容旧版规则])"); | |||||
$win->AddMsgItem("<textarea name='notes' style='width:100%;height:300px'></textarea>"); | |||||
$winform = $win->GetWindow("ok"); | |||||
$win->Display(); | |||||
exit(); | |||||
} | |||||
else | |||||
{ | |||||
CheckPurview('co_AddNote'); | |||||
require_once(DEDEINC."/dedetag.class.php"); | |||||
$notes = trim($notes); | |||||
//对Base64格式的规则进行解码 | |||||
if(ereg('^BASE64:',$notes)) | |||||
{ | |||||
if(!ereg(':END$',$notes)) | |||||
{ | |||||
ShowMsg('该规则不合法,Base64格式的采集规则为:BASE64:base64编码后的配置:END !','-1'); | |||||
exit(); | |||||
} | |||||
$notess = explode(':',$notes); | |||||
$notes = $notess[1]; | |||||
$notes = base64_decode(ereg_replace("[\r\n\t ]",'',$notes)) OR die('配置字符串有错误!'); | |||||
} | |||||
else | |||||
{ | |||||
$notes = stripslashes($notes); | |||||
} | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->LoadString($notes); | |||||
if(!is_array($dtp->CTags)) | |||||
{ | |||||
ShowMsg('该规则不合法,无法导入!','-1'); | |||||
exit(); | |||||
} | |||||
$ctag1 = $dtp->GetTagByName('listconfig'); | |||||
$ctag2 = $dtp->GetTagByName('itemconfig'); | |||||
$listconfig = $ctag1->GetInnerText(); | |||||
$itemconfig = addslashes($ctag2->GetInnerText()); | |||||
$dtp->LoadString($listconfig); | |||||
$listconfig = addslashes($listconfig); | |||||
$noteinfo = $dtp->GetTagByName('noteinfo'); | |||||
if(!is_object($noteinfo)) | |||||
{ | |||||
ShowMsg("该规则不合法,无法导入!","-1"); | |||||
exit(); | |||||
} | |||||
foreach($noteinfo->CAttribute->Items as $k=>$v) | |||||
{ | |||||
$$k = addslashes($v); | |||||
} | |||||
$uptime = time(); | |||||
if(empty($freq)) | |||||
{ | |||||
$freq = 1; | |||||
} | |||||
if(empty($extypeid)) | |||||
{ | |||||
$extypeid = 0; | |||||
} | |||||
if(empty($islisten)) | |||||
{ | |||||
$islisten = 0; | |||||
} | |||||
$inquery = " INSERT INTO `#@__co_note`(`channelid`,`notename`,`sourcelang`,`uptime`,`cotime`,`pnum`,`isok`,`usemore`,`listconfig`,`itemconfig`) | |||||
VALUES ('$channelid','$notename','$sourcelang','$uptime','0','0','0','$usemore','$listconfig','$itemconfig'); "; | |||||
$rs = $dsql->ExecuteNoneQuery($inquery); | |||||
if(!$rs) | |||||
{ | |||||
ShowMsg("保存信息时出现错误!".$dsql->GetError(),"-1"); | |||||
exit(); | |||||
} | |||||
ShowMsg("成功导入一个规则!","co_main.php"); | |||||
exit(); | |||||
} |
@@ -1,98 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 下载种子网址中未下载内容模式 | |||||
* | |||||
* @version $Id: co_get_corule.php 1 17:13 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('co_PlayNote'); | |||||
require_once(DEDEINC . '/dedecollection.class.php'); | |||||
if (empty($islisten)) $islisten = 0; | |||||
if (empty($glstart)) $glstart = 0; | |||||
if (empty($totalnum)) $totalnum = 0; | |||||
if (empty($notckpic)) $notckpic = 0; | |||||
$nid = (isset($nid) ? intval($nid) : 0); | |||||
//下载种子网址中未下载内容模式 | |||||
/*----------------------------- | |||||
function Download_not_down() { } | |||||
------------------------------*/ | |||||
if ($islisten == 0) { | |||||
$mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE nid='$nid' "); | |||||
$totalnum = $mrow['dd']; | |||||
$gurl = "co_gather_start_action.php?notckpic=$notckpic&islisten=$islisten&nid=$nid&startdd=$startdd&pagesize=$pagesize&sptime=$sptime"; | |||||
if ($totalnum <= 0) { | |||||
ShowMsg("你指定的模式为:<font color='red'>[下载种子网址中未下载内容]</font>,<br />使用这个模式节点必须已经有种子网址,否则请使用其它模式!", "javascript:;"); | |||||
exit(); | |||||
} else { | |||||
ShowMsg("检测节点正常,现转向网页采集...", $gurl . "&totalnum=$totalnum"); | |||||
exit(); | |||||
} | |||||
} | |||||
//监控式采集(检测新内容) | |||||
/*----------------------------- | |||||
function Download_new() { } | |||||
------------------------------*/ else if ($islisten == 1) { | |||||
$gurl = "co_gather_start_action.php?notckpic=$notckpic&islisten=1&nid=$nid&startdd=$startdd&pagesize=$pagesize&sptime=$sptime"; | |||||
$gurlList = "co_getsource_url_action.php?islisten=1&nid=0&pagesize=$pagesize&sptime=$sptime"; | |||||
//针对专门节点 | |||||
if (!empty($nid)) { | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
$limitList = $co->GetSourceUrl(1, 0, 100); | |||||
$row = $co->dsql->GetOne("SELECT COUNT(aid) AS dd FROM `#@__co_htmls` WHERE nid='$nid' "); | |||||
$totalnum = $row['dd']; | |||||
if ($totalnum == 0) { | |||||
ShowMsg("在这节点中没发现有新内容....", "javascript:;"); | |||||
exit(); | |||||
} else { | |||||
ShowMsg("已获得所有种子网址,转向网页采集...", $gurl . "&totalnum=$totalnum"); | |||||
exit(); | |||||
} | |||||
} | |||||
//针对所有节点 | |||||
else { | |||||
$curpos = (isset($curpos) ? intval($curpos) : 0); | |||||
$row = $dsql->GetOne("SELECT nid FROM `#@__co_note` ORDER BY nid ASC LIMIT $curpos,1"); | |||||
$nnid = $row['nid']; | |||||
if (!is_array($row)) { | |||||
ShowMsg("完成所有节点检测....", "co_gather_start_action.php?notckpic=0&sptime=0&nid=0&startdd=0&pagesize=5&totalnum=" . $totalnum); | |||||
exit(); | |||||
} else { | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nnid); | |||||
$limitList = $co->GetSourceUrl(1, 0, 100); | |||||
$curpos++; | |||||
ShowMsg("已检测节点( {$nnid} ),继续下一个节点...", $gurlList . "&curpos=$curpos"); | |||||
exit(); | |||||
} | |||||
} | |||||
} | |||||
//重新下载所有内容模式 | |||||
/*----------------------------- | |||||
function Download_all() { } | |||||
------------------------------*/ else { | |||||
$gurl = "co_gather_start_action.php?notckpic=$notckpic&islisten=$islisten&nid=$nid&startdd=$startdd&pagesize=$pagesize&sptime=$sptime"; | |||||
$gurlList = "co_getsource_url_action.php?islisten=$islisten&nid=$nid&startdd=$startdd&pagesize=$pagesize&sptime=$sptime"; | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
$limitList = $co->GetSourceUrl($islisten, $glstart, $pagesize); | |||||
if ($limitList == 0) { | |||||
$row = $co->dsql->GetOne("SELECT COUNT(aid) AS dd FROM `#@__co_htmls` WHERE nid='$nid'"); | |||||
$totalnum = $row['dd']; | |||||
ShowMsg("已获得所有种子网址,转向网页采集...", $gurl . "&totalnum=$totalnum"); | |||||
exit(); | |||||
} | |||||
if ($limitList > 0) { | |||||
ShowMsg("采集列表剩余:{$limitList} 个页面,继续采集...", $gurlList . "&glstart=" . ($glstart + $pagesize), 0, 100); | |||||
exit(); | |||||
} | |||||
} |
@@ -1,32 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集规则管理 | |||||
* | |||||
* @version $Id: co_main.php 1 17:13 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/datalistcp.class.php"); | |||||
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||||
$sql = "SELECT co.nid,co.channelid,co.notename,co.sourcelang,co.uptime,co.cotime,co.pnum,ch.typename"; | |||||
$sql .= " FROM `#@__co_note` co LEFT JOIN `#@__channeltype` ch ON ch.id=co.channelid ORDER BY co.nid DESC"; | |||||
$dlist = new DataListCP(); | |||||
$dlist->SetTemplet(DEDEADMIN . "/templets/co_main.htm"); | |||||
$dlist->SetSource($sql); | |||||
$dlist->display(); | |||||
function GetDatePage($mktime) | |||||
{ | |||||
return $mktime == '0' ? '从未采集过' : MyDate('Y-m-d', $mktime); | |||||
} | |||||
function TjUrlNum($nid) | |||||
{ | |||||
global $dsql; | |||||
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE nid='$nid' "); | |||||
return $row['dd']; | |||||
} |
@@ -1,18 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集规则测试 | |||||
* | |||||
* @version $Id: co_test_rule.php 1 17:13 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/dedecollection.class.php"); | |||||
$nid = intval($nid); | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
include DedeInclude('templets/co_test_rule.htm'); | |||||
exit(); |
@@ -1,57 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 采集地址 | |||||
* | |||||
* @version $Id: co_url.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/datalistcp.class.php"); | |||||
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||||
$where = ""; | |||||
if (!isset($nid)) $nid = ""; | |||||
if (!empty($nid)) $where = " where cu.nid='$nid' "; | |||||
if (empty($small)) $small = 0; | |||||
if ($nid != '') { | |||||
$exportbt = " | |||||
<input type='button' name='b0' value='导出内容' class='coolbg np' | |||||
style='width:80px' onClick=\"location.href='co_export.php?nid=$nid';\" /> | |||||
<input type='button' name='b0' value='采集本节点' class='coolbg np' | |||||
style='width:80px' onClick=\"location.href='co_gather_start.php?nid=$nid';\" /> | |||||
"; | |||||
} else { | |||||
$exportbt = ""; | |||||
} | |||||
$sql = "SELECT cu.aid,cu.nid,cu.isexport AS isex,cu.title,cu.url,cu.dtime,cu.isdown,cn.notename,tp.typename FROM `#@__co_htmls` cu | |||||
LEFT JOIN `#@__co_note` cn ON cn.nid=cu.nid | |||||
LEFT JOIN `#@__arctype` tp ON tp.id=cu.typeid | |||||
$where ORDER BY cu.aid DESC"; | |||||
$dlist = new DataListCP(); | |||||
$dlist->SetParameter("nid", $nid); | |||||
$dlist->SetParameter("small", $small); | |||||
if ($small == 0) { | |||||
$dlist->SetTemplate(DEDEADMIN . "/templets/co_url.htm"); | |||||
} else { | |||||
$dlist->SetTemplate(DEDEADMIN . "/templets/co_url_2.htm"); | |||||
} | |||||
$dlist->SetSource($sql); | |||||
$dlist->display(); | |||||
function IsDownLoad($isd) | |||||
{ | |||||
if ($isd == "0") return "未下载"; | |||||
else return "已下载"; | |||||
} | |||||
function IsExData($isex) | |||||
{ | |||||
if ($isex == 0) return "未导出"; | |||||
else return "已导出"; | |||||
} |
@@ -1,56 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: co_url.php 1 14:31 2010年7月12日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC . "/dedecollection.class.php"); | |||||
$backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "co_url.php"; | |||||
if (empty($action)) $action = ''; | |||||
if ($aid == '') { | |||||
ShowMsg('参数无效!', '-1'); | |||||
exit(); | |||||
} | |||||
//保存更改 | |||||
if ($action == "save") { | |||||
$result = ''; | |||||
for ($i = 0; $i < $endid; $i++) { | |||||
$result .= "{dede:field name=\\'" . ${"noteid_$i"} . "\\'}" . ${"value_$i"} . "{/dede:field}\r\n"; | |||||
} | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__co_htmls` SET result='$result' WHERE aid='$aid'; "); | |||||
ShowMsg("成功保存一条记录!", $backurl); | |||||
exit(); | |||||
} | |||||
$dsql->SetSql("SELECT * FROM `#@__co_htmls` WHERE aid='$aid'"); | |||||
$dsql->Execute(); | |||||
$row = $dsql->GetObject(); | |||||
$isdown = $row->isdown; | |||||
$nid = $row->nid; | |||||
$url = $row->url; | |||||
$dtime = $row->dtime; | |||||
$body = $row->result; | |||||
$litpic = $row->litpic; | |||||
$fields = array(); | |||||
if ($isdown == 0) { | |||||
$co = new DedeCollection(); | |||||
$co->LoadNote($nid); | |||||
$co->DownUrl($aid, $url, $litpic); | |||||
$co->dsql->SetSql("SELECT * FROM `#@__co_htmls` WHERE aid='$aid'"); | |||||
$co->dsql->Execute(); | |||||
$row = $co->dsql->GetObject(); | |||||
$isdown = $row->isdown; | |||||
$nid = $row->nid; | |||||
$url = $row->url; | |||||
$dtime = $row->dtime; | |||||
$body = $row->result; | |||||
$litpic = $row->litpic; | |||||
} | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace("dede", "{", "}"); | |||||
$dtp->LoadString($body); | |||||
include DedeInclude('templets/co_view.htm'); |
@@ -42,19 +42,6 @@ | |||||
>a_MyCheck>审核我发布的文档 | >a_MyCheck>审核我发布的文档 | ||||
>a_Recycling>管理回收站 | >a_Recycling>管理回收站 | ||||
>>采集管理 | |||||
>co_NewRule>管理数据规则模型 | |||||
>co_Switch>导入外部数据 | |||||
>co_AddNote>增加采集节点 | |||||
>co_EditNote>修改采集节点 | |||||
>co_PlayNote>采集数据 | |||||
>co_ListNote>列出采集节点 | |||||
>co_ViewNote>管理已下载内容 | |||||
>co_Export>采集内容入库 | |||||
>co_Del>删除采集节点 | |||||
>co_GetOut>导入离线数据 | |||||
>>模板管理 | >>模板管理 | ||||
>temp_All>管理所有模板 | >temp_All>管理所有模板 | ||||
@@ -461,46 +461,3 @@ $actionSearch[10] = array( | |||||
), | ), | ||||
) | ) | ||||
); | ); | ||||
$actionSearch[11] = array( | |||||
'toptitle' => '采集', | |||||
'title' => '采集管理', | |||||
'description' => '内容采集管理操作', | |||||
'soniterm' => array( | |||||
0 => array( | |||||
'title' => '采集节点管理 ', | |||||
'description' => '单个采集节点的管理页面,可以添加采集,导入,导出采集节点等', | |||||
'purview' => 'co_ListNote', | |||||
'linkurl' => 'co_main.php' | |||||
), | |||||
1 => array( | |||||
'title' => '临时内容管理 ', | |||||
'description' => '采集的临时内容存放处', | |||||
'purview' => 'co_ViewNote', | |||||
'linkurl' => 'co_url.php' | |||||
), | |||||
2 => array( | |||||
'title' => '导入采集规则', | |||||
'description' => '导入采集的规则', | |||||
'purview' => 'co_GetOut', | |||||
'linkurl' => 'co_get_corule.php' | |||||
), | |||||
3 => array( | |||||
'title' => '智能标记向导', | |||||
'description' => '可以根据需要生成相应的调用标签', | |||||
'purview' => 'temp_Other', | |||||
'linkurl' => 'mytag_tag_guide.php' | |||||
), | |||||
4 => array( | |||||
'title' => '监控采集模式 ', | |||||
'description' => '监控采集模式', | |||||
'purview' => 'co_GetOut', | |||||
'linkurl' => 'co_gather_start.php' | |||||
), | |||||
5 => array( | |||||
'title' => '采集未下载内容 ', | |||||
'description' => '采集没有下载完成的内容', | |||||
'purview' => 'co_GetOut', | |||||
'linkurl' => 'co_do.php?dopost=coall' | |||||
), | |||||
) | |||||
); |
@@ -108,14 +108,6 @@ $menusMain = " | |||||
$adminMenu1 | $adminMenu1 | ||||
<m:top item='3_' name='采集管理' display='none' rank='co_NewRule,co_ListNote,co_ViewNote,co_Switch,co_GetOut'> | |||||
<m:item name='采集节点管理' link='co_main.php' rank='co_ListNote' target='main' /> | |||||
<m:item name='临时内容管理' link='co_url.php' rank='co_ViewNote' target='main' /> | |||||
<m:item name='导入采集规则' link='co_get_corule.php' rank='co_GetOut' target='main'/> | |||||
<m:item name='监控采集模式' link='co_gather_start.php' rank='co_GetOut' target='main'/> | |||||
<m:item name='采集未下载内容' link='co_do.php?dopost=coall' rank='co_GetOut' target='main'/> | |||||
</m:top> | |||||
<m:top item='1_3_3' name='批量维护' display='block'> | <m:top item='1_3_3' name='批量维护' display='block'> | ||||
<m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | ||||
<m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> | <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> | ||||
@@ -60,14 +60,6 @@ $menusMain = " | |||||
<m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> | <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='3' item='3_' name='采集管理' display='none' rank='co_NewRule,co_ListNote,co_ViewNote,co_Switch,co_GetOut'> | |||||
<m:item name='采集节点管理' link='co_main.php' rank='co_ListNote' target='main' /> | |||||
<m:item name='临时内容管理' link='co_url.php' rank='co_ViewNote' target='main' /> | |||||
<m:item name='导入采集规则' link='co_get_corule.php' rank='co_GetOut' target='main'/> | |||||
<m:item name='监控采集模式' link='co_gather_start.php' rank='co_GetOut' target='main'/> | |||||
<m:item name='采集未下载内容' link='co_do.php?dopost=coall' rank='co_GetOut' target='main'/> | |||||
</m:top> | |||||
<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> | <m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> | ||||
<m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | ||||
<m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> | <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> | ||||
@@ -1,38 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>选择内容模型</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<form name="form1" action="co_add.php" method="get"> | |||||
<input type='hidden' name='step' value='1' /> | |||||
<tr> | |||||
<td width="100%" height="28" colspan="3" background='images/tbg.gif' style="padding-left:10px;"><strong>选择内容模型</strong> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="34" colspan="3" bgcolor="#FFFFFF"> | |||||
<select name="channelid" id="channelid" style="width:250px"> | |||||
<?php | |||||
$dsql->SetQuery("Select id,typename From `#@__channeltype` where id in(1,2) order by id asc "); | |||||
$dsql->Execute(); | |||||
while($row = $dsql->GetObject()) | |||||
{ | |||||
echo "<option value='{$row->id}'>{$row->typename}</option>\r\n"; | |||||
} | |||||
?> | |||||
</select> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="3" bgcolor="#F9FCEF"> | |||||
<input name="imageField" class="np" type="image" src="images/button_ok.gif" width="60" height="22" border="0"> | |||||
</td> | |||||
</tr> | |||||
</form> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,270 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>新增采集节点</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<script language="javascript" type="text/javascript" src="js/co.js"></script> | |||||
<style type="text/css"> | |||||
<!-- | |||||
.STYLE2 { | |||||
color: #666666 | |||||
} | |||||
--> | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle" style="width:98%"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;"><b>新增采集节点:第一步设置基本信息及网址索引页规则</b></div> | |||||
<div style='float:right;padding-right:6px;padding-top:3px'> | |||||
<input type="button" name="b" value="返回节点管理页" class="coolbg np" style="width:110px;height:20px;" | |||||
onclick="location.href='co_main.php';" /> | |||||
</div> | |||||
</div> | |||||
<form name="form1" method="post" action="co_add.php"> | |||||
<input type='hidden' name='channelid' value='<?php echo $channelid; ?>' /> | |||||
<input type='hidden' name='step' value='2' /> | |||||
<input type='hidden' name='dopost' value='test' /> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('sitem');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374"><b>节点基本信息</b><a name="d1"></a></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="sitem"> | |||||
<td bgcolor="#FFFFFF" width="100%"> | |||||
<table width="100%" border="0" cellpadding="2" cellspacing="2"> | |||||
<tr> | |||||
<td width="18%" height="24">节点名称:</td> | |||||
<td width="32%"><input name="notename" type="text" id="notename" style="width:250px" /></td> | |||||
<td width="18%">目标页面编码:</td> | |||||
<td width="32%"> | |||||
<input type="radio" name="sourcelang" id='language1' class="np" value="gb2312" checked='1' /> | |||||
GB2312 | |||||
<input type="radio" name="sourcelang" id='language2' class="np" value="utf-8" /> | |||||
UTF8 | |||||
<input type="radio" name="sourcelang" id='language3' class="np" value="big5" /> | |||||
BIG5 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">区域匹配模式:</td> | |||||
<td> | |||||
<input type="radio" class="np" name="macthtype" value="regex" /> | |||||
正则表达式 | |||||
<input name="macthtype" class="np" type="radio" value="string" checked='1' /> | |||||
字符串 | |||||
</td> | |||||
<td>内容导入顺序:</td> | |||||
<td> | |||||
<input type="radio" name="cosort" id="cosort1" value="asc" class='np' checked='1' /> | |||||
与目标站一致 | |||||
<input type="radio" name="cosort" id="cosort2" class='np' value="desc" /> | |||||
与目标站相反 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="4" bgcolor="#FBFCE2"><img src="images/file_tt.gif" width="7" | |||||
height="8" />以下选项仅在开启防盗链模式才需设定,如果目标网站没有防盗链功能请不要开启,否则会降低采集速度。</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">防盗链模式:</td> | |||||
<td> | |||||
<input name="isref" type="radio" class="np" value="no" checked='1' /> | |||||
不开启 | |||||
<input name="isref" type="radio" class="np" value="yes" /> | |||||
开启 | |||||
</td> | |||||
<td>资源下载超时时间:</td> | |||||
<td> | |||||
<input name="exptime" type="text" id="exptime" value="10" size="3" />秒 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">引用网址:</td> | |||||
<td colspan="3"> | |||||
<input name="refurl" type="text" id="refurl" value="http://" size="30" style='width:250px' /> | |||||
(一般为目标网站其中一个文章页的网址) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('slist');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374"><b>列表网址获取规则</b></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="slist"> | |||||
<td bgcolor="#FFFFFF"> | |||||
<table width="100%" border="0"> | |||||
<tr> | |||||
<td width="18%" height="24">来源属性:</td> | |||||
<td> | |||||
<input type="radio" name="sourcetype" id="source1" class='np' onclick="selSourceSet()" value="batch" | |||||
checked="checked" /> | |||||
批量生成列表网址 | |||||
<input type="radio" name="sourcetype" id="source2" class='np' onclick="selSourceSet()" value="hand" /> | |||||
手工指定列表网址 | |||||
<input type="radio" name="sourcetype" id="source3" class='np' onclick="selSourceSet()" value="rss" /> | |||||
从RSS中获取 | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#F7FCB4" id="rssset" style="display:none"> | |||||
<td height="24" bgcolor="#F4FCCB">RSS网址:</td> | |||||
<td bgcolor="#F4FCCB"> | |||||
<input type="text" name="rssurl" id="rssurl" style="width:350px" value="http://" /> | |||||
<input type="button" name="btv2" id="btv2" value="测试" onclick="testRss()" /> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#FBFCE2" id="batchset"> | |||||
<td height="77">批量生成地址设置:</td> | |||||
<td> | |||||
<table width="90%"> | |||||
<tr> | |||||
<td width="100%" colspan="2"> | |||||
匹配网址: | |||||
<input type="text" name="regxurl" id="regxurl" style="width:350px" value="http://" /> | |||||
<input type="button" name="btv1" id="btv1" value="测试" onclick="testRegx()" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"> | |||||
<span | |||||
class="STYLE2">(如:http://wwws.dedebiz.com/html/test/list_(*).html,如果不能匹配所有网址,可以在手工指定网址的地方输入要追加的网址) | |||||
</span> </td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"> | |||||
(*)从 | |||||
<input type="text" name="startid" id="startid" style="width:30px" value="1" /> | |||||
到 | |||||
<input type="text" name="endid" id="endid" style="width:30px" value="" /> | |||||
(页码或规律数字) | |||||
每页递增: | |||||
<input type="text" name="addv" id="addv" style="width:30px" value="1" /> | |||||
<input type="checkbox" name="usemore" id="usemore" class="np" value="1" onClick="testMore()" /> | |||||
启用多栏目通配(#) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id='handset'> | |||||
<td height="171">手工指定网址:<br /> | |||||
<span class="STYLE2">在指定了通配规则后有些不能匹配的网址也可以在这里指定。</span><br /></td> | |||||
<td><textarea name="addurls" id="addurls" cols="45" rows="5" style="width:80%;height:160px"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr id='usemoretr' style="display:none"> | |||||
<td height="171">多栏目通配规则:<br /> | |||||
<span class="STYLE2"> | |||||
如果目标网站使用单一模板,可以在匹配网址中用"(#)"表示近似网址的差异,然后在通配规则中设定集合,并且可以指定导出栏目。 | |||||
</span> | |||||
<br /> | |||||
</td> | |||||
<td> | |||||
<textarea name="batchrule" id="batchrule" cols="45" rows="5" style="width:80%;height:160px"></textarea> | |||||
<br /><span style='color:#666666'>格式为:“[(#)=通配字符串; (*)=num-num; typeid=num]换行” | |||||
<br />例如:[(#)=>labs/list_3; (*)=>1-25; typeid=>7] 匹配网址:http://www.aaa.com/(#)_(*).html</span> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('arturl');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374"><b>文章网址匹配规则</b></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="arturl"> | |||||
<td height="76" valign="top" bgcolor="#FFFFFF"> | |||||
<table width="100%"> | |||||
<!-- //使用与正则匹配链接模式不大稳定,也不适合初级用户,暂时作为保留项 --> | |||||
<tr style='display:none'> | |||||
<td width="18%">内容网址匹配模式:</td> | |||||
<td width="82%"> | |||||
<input name="urlrule" type="radio" class="np" id="urlrule1" value="area" onclick="selUrlRuleSet()" | |||||
checked="checked" /> | |||||
指定包含有文章网址的区域(可以获取区域的网址、标题、图片等信息) | |||||
<input type="radio" name="urlrule" id="urlrule2" value="regx" onclick="selUrlRuleSet()" class="np" /> | |||||
指定网址正则表达式(仅能获得网址信息) </td> | |||||
</tr> | |||||
<tr id="regxruletr" style='display:none'> | |||||
<td height="84">网址的正则表达式:</td> | |||||
<td><textarea name="regxrule" id="regxrule" cols="45" rows="5" style="width:80%;height:60px"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr id="arearuletr"> | |||||
<td height="84">包含有文章网址的区域设置:</td> | |||||
<td> | |||||
<table width="90%"> | |||||
<tr> | |||||
<td width="22%" align="center">区域开始的HTML:</td> | |||||
<td width="78%"> | |||||
<textarea name="areastart" id="areastart" cols="45" rows="5" | |||||
style="width:80%;height:60px"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center">区域结束的HTML:</td> | |||||
<td> | |||||
<textarea name="areaend" id="areaend" cols="45" rows="5" style="width:80%;height:60px"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center">如果链接中含有图片:</td> | |||||
<td> | |||||
<input name="listpic" type="radio" class='np' id="listpic1" value="0" /> | |||||
不处理 | |||||
<input type="radio" name="listpic" id="listpic2" class='np' value="1" checked="checked" /> | |||||
采集为缩略图 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td rowspan="2" align="center">对区域网址进行再次筛选:<br /> | |||||
(使用正则表达式)</td> | |||||
<td>必须包含: | |||||
<input type="text" name="musthas" id="musthas" style="width:280px" /> | |||||
(优先级高于后者)</td> | |||||
</tr> | |||||
<tr> | |||||
<td>不能包含: | |||||
<input type="text" name="nothas" id="nothas" style="width:280px" /></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="94" align="center" bgcolor="#FFFFFF"> | |||||
<input type="submit" name="b12" value="保存信息并进入下一步设置" class="coolbg np" style="width:200px" /> </td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,77 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集节点测试</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<script language="javascript" type="text/javascript" src="js/co.js"></script> | |||||
<style type="text/css"> | |||||
<!-- | |||||
.STYLE2 {color: #666666} | |||||
--> | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle" style="width:98%"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;"><b>新增采集节点:测试基本信息及网址索引页规则设置</b></div> | |||||
<div style='float:right;padding-right:6px;padding-top:3px'> | |||||
<input type="button" name="b" value="返回节点管理页" class="coolbg np" style="width:110px;height:20px;" onclick="location.href='co_main.php';" /> | |||||
</div> | |||||
</div> | |||||
<form name="form1" method="post" action="co_add.php"> | |||||
<input type='hidden' name='channelid' value='<?php echo $channelid; ?>' /> | |||||
<input type='hidden' name='step' value='2' /> | |||||
<input type='hidden' name='dopost' value='preview' /> | |||||
<input type='hidden' name='notename' value="<?php echo $notename; ?>" /> | |||||
<input type='hidden' name='sourcelang' value="<?php echo $sourcelang; ?>" /> | |||||
<input type='hidden' name='usemore' value="<?php echo $usemore; ?>" /> | |||||
<input type='hidden' name='islisten' value="<?php echo $islisten; ?>" /> | |||||
<input type='hidden' name='listenpage' value="<?php echo $listenpage; ?>" /> | |||||
<input type='hidden' name='freq' value="<?php echo $freq; ?>" /> | |||||
<input type='hidden' name='extypeid' value="<?php echo $extypeid; ?>" /> | |||||
<input type='hidden' name='listconfig' value="<?php echo urlencode($listconfig); ?>" /> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td height="25" background="images/tbg.gif" bgcolor="#F2F6E5" style="padding-left:10px;"><strong>网址获取规则测试:</strong></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="26" bgcolor="#FFFFFF"> | |||||
测试的列表网址:<?php echo $demopage; ?> | |||||
</td> | |||||
</tr> | |||||
<tr id="sitem"> | |||||
<td height="23" bgcolor="#ffffff"> | |||||
获得的文章网址(只显示前十条):<br /> | |||||
<?php | |||||
if(isset($links[0])) | |||||
{ | |||||
$i = 1; | |||||
foreach($links as $arr) | |||||
{ | |||||
if($i==1) echo "<input type='hidden' name='previewurl' value=\"{$arr['link']}\" />\r\n"; | |||||
if($arr['image'] != '') $arr['image'] = "<img src='{$arr['image']}' />\r\n"; | |||||
echo "<hr />"; | |||||
echo "网址: <a href='{$arr['link']}' target='_blank'>{$arr['link']}</a><br />\r\n标题: {$arr['title']}<br />\r\n图片: {$arr['image']}\r\n"; | |||||
$i++; | |||||
if($i>10) break; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
echo $errmsg; | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="94" align="center" bgcolor="#FFFFFF"> | |||||
<input type="button" name="b2" value="返回上一步进行修改" class="coolbg np" onclick="history.go(-1);" style="width:200px" /> | |||||
| |||||
<input type="submit" name="b12" value="保存信息并进入下一步设置" class="coolbg np" style="width:200px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,341 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<script language="javascript" type="text/javascript" src="js/co.js"></script> | |||||
<title>新增采集节点</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
<style type="text/css"> | |||||
<!-- | |||||
.STYLE1 { | |||||
color: #660000; | |||||
font-weight: bold; | |||||
} | |||||
.adline { | |||||
border-bottom:1px solid #cdcdcd; | |||||
} | |||||
.autotb td{ | |||||
padding-left:3px; | |||||
} | |||||
--> | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle" style="width:98%"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;"><b>新增采集节点:第二步设置内容字段获取规则</b></div> | |||||
</div> | |||||
<form name="form1" method="post" action="co_add.php"> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>' /> | |||||
<input type='hidden' name='channelid' value='<?php echo $channelid; ?>' /> | |||||
<input type='hidden' name='step' value='5' /> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('sart');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374"><b>网页内容获取规则</b></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="sart"> | |||||
<td height="113" valign="top" bgcolor="#FFFFFF"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr id='achelp' style="display:none"> | |||||
<td height="60" colspan="3">1、匹配规则:在匹配区域规则中,规则一般为“<font color="#FF0000">起始无重复HTML</font><span class="STYLE1">[内容]</span><font color="#FF0000">结尾无重复HTML</font>”(普通匹配,非正则)。<br/> | |||||
2、字段值:如果指定的字段没有指定区域匹配规则,用这个值作为默认值。<br /> | |||||
3、过滤规则:如果有多个规则,用<br /><font color='#6B7360'> | |||||
{dede:trim replace=""}规则一{/dede:trim}<br /> | |||||
{dede:trim replace=""}规则二{/dede:trim}<br /> | |||||
...</font>表示,如果要替换成指定的值,在 replace=""里设置即可 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35">预览网址:</td> | |||||
<td><input type="text" name="previewurl" id="previewurl" style="width:90%" value="<?php echo $previewurl; ?>" /></td> | |||||
<td> </td> | |||||
</tr> | |||||
<tr> | |||||
<td width="18%" height="60"><a href="#" onclick="showHide('achelp')"><img src="images/help.gif" width="16" height="16" /></a>内容分页导航所在的区域匹配规则:<br/></td> | |||||
<td><textarea name="sppage" rows="3" id="sppage" style="width:90%"></textarea></td> | |||||
<td width="37%"> | |||||
<input name="sptype" type="radio" value="full" class="np" checked='1' /> | |||||
全部列出的分页列表<br/> | |||||
<input type="radio" name="sptype" class="np" value="next" /> | |||||
上下页形式或不完整的分页列表 | |||||
<br /> | |||||
<input type="radio" name="sptype" class="np" value="diyrule"/> | |||||
分页列表规则 开始: | |||||
<input name="srul" type="text" value="1" size="4" /> | |||||
结束: | |||||
<input name="erul" type="text" value="5" size="4" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35" colspan="3" bgcolor="#FBFCE2" id="dyrule">如果设定分页列表规则.可采用地址规则(正则),其中{p}是递增变量,从1开始每次增加1,例如:{path}{file}_{p}{ext}<br /> | |||||
<strong>规则说明:{path}</strong>地址+目录 <strong>{file}</strong>文件 <strong>{ext}</strong>文件扩展名<strong>{p}</strong>分页列表数</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="3" bgcolor="#F9FCEF"> | |||||
<strong>以下为固定的采集项目:</strong>(项目点击可展开/隐藏,内容摘要、关键字、缩略图系统会用正则进行自动匹配) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"> | |||||
<tr> | |||||
<td width="50%" valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td height="24"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">关键字过滤内容:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="keywordtrim" rows="4" id="keywordtrim" style="width:90%"></textarea> | |||||
</td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td height="24"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">摘要过滤内容:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="descriptiontrim" rows="4" id="descriptiontrim" style="width:90%"></textarea> | |||||
</td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="50%" valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" onclick="showHide('ttitle')"><b><u>文章标题</u></b></a></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" id="ttitle"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='title' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="match_title" rows="4" id="match_title" style="width:90%"><title>[内容]</title></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"><textarea name="trim_title" cols="20" rows="3" id="trim_title" style="width:90%"></textarea> </td> | |||||
<td height="63"><input type="button" name="button" id="button" value="常用规则" onclick="selTrim('trim_title')" /> </td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" onclick="showHide('twriter')"><b><u>文章作者</u></b></a> </td> | |||||
</tr> | |||||
<tr id="twriter"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='writer' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"><textarea name="match_writer" rows="4" id="match_writer" style="width:90%"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"><textarea name="trim_writer" cols="20" rows="3" id="trim_writer" style="width:90%"></textarea> | |||||
</td> | |||||
<td width="29%" height="63"><input type="button" name="button2" id="button2" value="常用规则" onclick="selTrim('trim_writer')" /> | |||||
</td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#EBEFD1"> | |||||
<td height="24" bgcolor="#F0F7D9" class="adline"> <a href="#" onclick="showHide('tsource')"><b><u>文章来源</u></b></a> </td> | |||||
</tr> | |||||
<tr id="tsource"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='source' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"><textarea name="match_source" rows="4" id="match_source" style="width:90%"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"><textarea name="trim_source" cols="20" rows="3" id="trim_source" style="width:90%"></textarea> | |||||
</td> | |||||
<td height="63"><input type="button" name="button4" id="button4" value="常用规则" onclick="selTrim('trim_source')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" onclick="showHide('tpubdate')"><b><u>发布时间</u></b></a> </td> | |||||
</tr> | |||||
<tr id="tpubdate"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='pubdate' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"><textarea name="match_pubdate" rows="4" id="match_pubdate" style="width:90%"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"><textarea name="trim_pubdate" cols="20" rows="3" id="trim_pubdate" style="width:90%"></textarea> | |||||
</td> | |||||
<td width="29%" height="63"><input type="button" name="button3" id="button3" value="常用规则" onclick="selTrim('trim_pubdate')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<input name="function_pubdate" type="hidden" id="function_pubdate" value="@me=GetMkTime(@me);" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<!-- 固定项目结束,下面为自动项目 --> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="55%" height="24" colspan="3" bgcolor="#FBFCE2"> | |||||
<strong>以下是针对模型设置的采集项目:</strong> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
$row = $dsql->GetOne("Select * From `#@__channeltype` where id='$channelid' "); | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace('field','<','>'); | |||||
$dtp->LoadString($row['fieldset']); | |||||
foreach($dtp->CTags as $ctag) | |||||
{ | |||||
//采集禁用的字段 | |||||
$notsend = $ctag->GetAtt('notsend'); | |||||
if($notsend==1) continue; | |||||
$fieldtype = $ctag->GetAtt('type'); | |||||
$tname = $ctag->GetTagName(); | |||||
$iname = $ctag->GetAtt('itemname'); | |||||
//设置转换函数 | |||||
if($fieldtype=='img') $functions = "@me=TurnImageTag(@me);"; | |||||
else if($fieldtype=='softlinks'||$fieldtype=='addon') $functions = "@me=TurnLinkTag(@me);"; | |||||
else if($fieldtype=='dtime') $functions = "@me=GetMkTime(@me);"; | |||||
else $functions = ''; | |||||
//对不同类型设置默认值 | |||||
if($ctag->GetAtt('default')!='') { | |||||
$dfvalue = $ctag->GetAtt('default'); | |||||
} | |||||
else if($fieldtype=='int'||$fieldtype=='float'||$fieldtype=='number') { | |||||
$dfvalue = '0'; | |||||
} | |||||
else if($fieldtype=='dtime') { | |||||
$dfvalue = time(); | |||||
} | |||||
else { | |||||
$dfvalue = ''; | |||||
} | |||||
?> | |||||
<input type='checkbox' name='fields[]' checked='1' value='<?php echo $tname; ?>' style='display:none' /> | |||||
<table width="99%" border="0" cellspacing="0" cellpadding="0" class='autotb' style="margin-top:2px"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td width="18%" height="24" class="adline"> | |||||
<a href="#" onclick="showHide('t<?php echo $tname; ?>')"><b><u><?php echo $iname; ?></u></b></a> | |||||
</td> | |||||
<td width="12%" class="adline"> </td> | |||||
<td width="10%" class="adline"><strong>字段默认值:</strong></td> | |||||
<td class="adline"> | |||||
<input name="value_<?php echo $tname; ?>" type="text" id="value_<?php echo $tname; ?>" value="<?php echo $dfvalue; ?>" size="25" style="width:250px" /> | |||||
</td> | |||||
</tr> | |||||
<tr id="t<?php echo $tname; ?>"> | |||||
<td height="24" colspan="4"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="16%" height="80">匹配规则:</td> | |||||
<td height="20"> | |||||
<textarea name="match_<?php echo $tname; ?>" rows="4" id="match_<?php echo $tname; ?>" style="width:90%"></textarea> | |||||
</td> | |||||
<td height="20"> | |||||
<?php | |||||
if($fieldtype=='htmltext' || $fieldtype=='img') | |||||
{ | |||||
?> | |||||
<input name="isunit_<?php echo $tname; ?>" type="checkbox" id="isunit_<?php echo $tname; ?>" value="1" class="np" checked='checked' /> | |||||
分页内容字段(规则中只允许单一的该类型字段)<br/> | |||||
<input name="isdown_<?php echo $tname; ?>" type="checkbox" id="isdown_<?php echo $tname; ?>" value="1" class="np" checked='checked' /> | |||||
下载字段里的多媒体资源 | |||||
<?php | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td height="63"> | |||||
<textarea name="trim_<?php echo $tname; ?>" cols="20" rows="3" id="trim_<?php echo $tname; ?>" style="width:90%"></textarea> | |||||
</td> | |||||
<td height="63"> | |||||
<input type="button" name="button<?php echo $tname; ?>" id="button<?php echo $tname; ?>" value="常用规则" onclick="selTrim('trim_<?php echo $tname; ?>')" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="18%" height="60">自定义处理接口:</td> | |||||
<td width="52%" height="20"> | |||||
<textarea name="function_<?php echo $tname; ?>" cols="20" rows="3" id="function_<?php echo $tname; ?>" style="width:90%"><?php | |||||
echo $functions; | |||||
?></textarea> | |||||
</td> | |||||
<td width="30%" height="20"> | |||||
函数或程序的变量<br /> | |||||
@body 表示原始网页 @litpic 缩略图<br /> | |||||
@me 表示当前标记值和最终结果 | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php } ?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="52" align="center" bgcolor="#FFFFFF"> | |||||
<input type="submit" name="b12" value="保存配置并预览" class="coolbg" style="width:150px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,55 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集节点测试</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<script language='javascript' type="text/javascript" src="js/co.js"></script> | |||||
<style type="text/css"> | |||||
<!-- | |||||
.STYLE2 {color: #666666} | |||||
--> | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle" style="width:98%"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt"><b>新增采集节点:测试内容字段设置</b></div> | |||||
<div style='float:right;padding-right:6px;padding-top:3px'> | |||||
<input type="button" name="b" value="返回节点管理页" class="coolbg np" style="width:110px;height:20px;" onclick="location.href='co_main.php';" /> | |||||
</div> | |||||
</div> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td height="25" background="images/tbg.gif" bgcolor="#F2F6E5"><strong>网址获取规则测试:</strong>(测试时不会下载远程图片)</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="26" bgcolor="#FFFFFF"> | |||||
测试的网址:<?php echo $previewurl; ?> | |||||
</td> | |||||
</tr> | |||||
<tr id="sitem"> | |||||
<td height="23" bgcolor="#ffffff"> | |||||
<?php | |||||
if($previewurl=='') echo "你没有指定测试时使用的文章网址,因此系统无法进行测试!"; | |||||
else { | |||||
$dc = new DedeCollection(); | |||||
$dc->LoadNote($nid); | |||||
echo "<textarea name='test' style='width:100%;height:450px'>".$dc->TestArt($previewurl)."</textarea>"; | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="94" align="center" bgcolor="#FFFFFF"> | |||||
<input type="button" name="b2" value="返回上一步进行修改" class="coolbg np" onclick="history.go(-1);" style="width:180px" /> | |||||
| |||||
<input type="button" name="b3" value="仅保存" class="coolbg np" style="width:80px" onclick="location='co_add.php?nid=<?php echo $nid; ?>&step=6';" /> | |||||
| |||||
<input type="button" name="b5" value="保存并开始采集" class="coolbg np" style="width:120px" onclick="location='co_add.php?nid=<?php echo $nid; ?>&step=7';" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,20 +0,0 @@ | |||||
<dede:comments> | |||||
<!-- | |||||
//织梦采集在线版的配置文件模板 | |||||
//详细说明请到: www.dedebiz.com 官方网站阅读介绍 | |||||
//节点的基本信息 | |||||
<dede:item></dede:item> | |||||
//被采采集的列表配置 | |||||
<dede:list></dede:list> | |||||
//被采集的文章配置 | |||||
<dede:art></dede:art> | |||||
//枚举类别 | |||||
<dede:typeEnum></dede:typeEnum> | |||||
--> | |||||
</dede:comments> | |||||
~templets~ |
@@ -1,712 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>修改采集节点</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<script language="javascript" src="../static/js/jquery.js"></script> | |||||
<script language="javascript" src="js/main.js"></script> | |||||
<script language="javascript" type="text/javascript" src="js/co.js"></script> | |||||
<style type="text/css"> | |||||
.STYLE2 { | |||||
color: #666666 | |||||
} | |||||
tr { | |||||
display: compact | |||||
} | |||||
/*chrome调整*/ | |||||
@media screen and (-webkit-min-device-pixel-ratio:0) { | |||||
tr { | |||||
display: table-row | |||||
} | |||||
} | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle" style="width:98%"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;"><b>修改采集节点</b></div> | |||||
<div style='float:right;padding-right:6px;padding-top:3px'> | |||||
<input type="button" name="aaa" value="开始采集" class="coolbg np" style="width:80px;height:20px;" | |||||
onclick="location.href='co_gather_start.php?nid=<?php echo $nid; ?>';" /> | |||||
<input type="button" name="bbb" value="返回节点管理页" class="coolbg np" style="width:110px;height:20px;" | |||||
onclick="location.href='co_main.php';" /> | |||||
</div> | |||||
</div> | |||||
<form name="form1" method="post" action="co_edit.php"> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>' /> | |||||
<input type='hidden' name='channelid' value='<?php echo $channelid; ?>' /> | |||||
<input type='hidden' name='dopost' value='saveandtest' /> | |||||
<input type='hidden' name='donext' value='text' /> | |||||
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1"> | |||||
<tr> | |||||
<td colspan="2"> | |||||
<table height="24" border="0" cellpadding="0" cellspacing="0"> | |||||
<tr> | |||||
<td width="84" align="center" background="images/itemnote1.gif">网址索引</td> | |||||
<td width="84" align="center" background="images/itemnote2.gif"><a href="#" | |||||
onClick="showItem2()"><u>内容配置</u></a></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none"> | |||||
<tr> | |||||
<td colspan="2"> | |||||
<table height="24" border="0" cellpadding="0" cellspacing="0"> | |||||
<tr> | |||||
<td width="84" align="center" background="images/itemnote2.gif"><a href="#" | |||||
onClick="showItem1()"><u>网址索引</u></a></td> | |||||
<td width="84" align="center" background="images/itemnote1.gif">内容配置</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="98%" border="0" id="needset" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('sitem');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374">节点基本信息<a name="d1"></a></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="sitem"> | |||||
<td bgcolor="#FFFFFF"> | |||||
<table width="100%" border="0"> | |||||
<tr> | |||||
<td width="18%" height="24">节点名称:</td> | |||||
<td width="32%"> | |||||
<input name="notename" type="text" id="notename" value="<?php echo $notename; ?>" style="width:250px" /> | |||||
</td> | |||||
<td width="18%">目标页面编码:</td> | |||||
<td width="32%"> | |||||
<input type="radio" name="sourcelang" id='language1' class="np" value="gb2312" | |||||
<?php if($noteinfo->GetAtt('sourcelang')=='gb2312') echo " checked='1'"; ?> /> | |||||
GB2312 | |||||
<input type="radio" name="sourcelang" id='language2' class="np" value="utf-8" | |||||
<?php if($noteinfo->GetAtt('sourcelang')=='utf-8') echo " checked='1'"; ?> /> | |||||
UTF8 | |||||
<input type="radio" name="sourcelang" id='language3' class="np" value="big5" | |||||
<?php if($noteinfo->GetAtt('sourcelang')=='big5') echo " checked='1'"; ?> /> | |||||
BIG5 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">区域匹配模式:</td> | |||||
<td> | |||||
<input type="radio" class="np" name="macthtype" value="regex" | |||||
<?php if($noteinfo->GetAtt('macthtype')=='regex') echo " checked='1'"; ?> /> | |||||
正则表达式 | |||||
<input name="macthtype" class="np" type="radio" value="string" | |||||
<?php if($noteinfo->GetAtt('macthtype')=='string') echo " checked='1'"; ?> /> | |||||
字符串 | |||||
</td> | |||||
<td>内容导入顺序:</td> | |||||
<td> | |||||
<input type="radio" name="cosort" id="cosort1" value="asc" class='np' | |||||
<?php if($noteinfo->GetAtt('cosort')=='asc') echo " checked='1'"; ?> /> | |||||
与目标站一致 | |||||
<input type="radio" name="cosort" id="cosort2" class='np' value="desc" | |||||
<?php if($noteinfo->GetAtt('cosort')=='desc') echo " checked='1'"; ?> /> | |||||
与目标站相反 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="4" bgcolor="#F9FCEF"><img src="images/file_tt.gif" width="7" | |||||
height="8" />以下选项仅在开启防盗链模式才需设定,如果目标网站没有防盗链功能请不要开启,否则会降低采集速度。</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">防盗链模式:</td> | |||||
<td> | |||||
<input name="isref" type="radio" class="np" value="no" | |||||
<?php if($noteinfo->GetAtt('isref')=='no') echo " checked='1'"; ?> /> | |||||
不开启 | |||||
<input name="isref" type="radio" class="np" value="yes" | |||||
<?php if($noteinfo->GetAtt('isref')=='yes') echo " checked='1'"; ?> /> | |||||
开启 | |||||
</td> | |||||
<td>资源下载超时时间:</td> | |||||
<td> | |||||
<input name="exptime" type="text" id="exptime" value="<?php echo $noteinfo->GetAtt('exptime'); ?>" | |||||
size="3" />秒 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">引用网址:</td> | |||||
<td colspan="3"> | |||||
<input name="refurl" type="text" id="refurl" value="<?php echo $noteinfo->GetAtt('refurl'); ?>" | |||||
size="30" style='width:250px' /> | |||||
(一般为目标网站其中一个文章页的网址) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('slist');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374">列表网址获取规则</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="slist"> | |||||
<td bgcolor="#FFFFFF"> | |||||
<table width="100%" border="0"> | |||||
<tr> | |||||
<td width="18%" height="24">来源属性:</td> | |||||
<td> | |||||
<input type="radio" name="sourcetype" id="source1" class='np' onclick="selSourceSet()" value="batch" | |||||
<?php if($listrule->GetAtt('sourcetype')=='batch') echo " checked='checked'"; ?> /> | |||||
批量生成列表网址 | |||||
<input type="radio" name="sourcetype" id="source2" class='np' onclick="selSourceSet()" value="hand" | |||||
<?php if($listrule->GetAtt('sourcetype')=='hand') echo " checked='checked'"; ?> /> | |||||
手工指定列表网址 | |||||
<input type="radio" name="sourcetype" id="source3" class='np' onclick="selSourceSet()" value="rss" | |||||
<?php if($listrule->GetAtt('sourcetype')=='rss') echo " checked='checked'"; ?> /> | |||||
从RSS中获取 | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#F9FCEF" id="rssset" style="display:none"> | |||||
<td height="24">RSS网址:</td> | |||||
<td> | |||||
<input type="text" name="rssurl" id="rssurl" style="width:350px" | |||||
value="<?php echo $listrule->GetAtt('rssurl'); ?>" /> | |||||
<input type="button" name="btv2" id="btv2" value="测试" onclick="testRss()" /> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#F9FCEF" id="batchset"> | |||||
<td height="77">批量生成地址设置:</td> | |||||
<td> | |||||
<table width="90%"> | |||||
<tr> | |||||
<td width="100%" colspan="2"> | |||||
匹配网址: | |||||
<input type="text" name="regxurl" id="regxurl" style="width:350px" | |||||
value="<?php echo $listrule->GetAtt('regxurl'); ?>" /> | |||||
<input type="button" name="btv1" id="btv1" value="测试" onclick="testRegx()" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"> | |||||
<span | |||||
class="STYLE2">(如:https://www.dedebiz.com/html/test/list_(*).html,如果不能匹配所有网址,可以在手工指定网址的地方输入要追加的网址) | |||||
</span> </td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"> | |||||
(*)从 | |||||
<input type="text" name="startid" id="startid" style="width:30px" | |||||
value="<?php echo $listrule->GetAtt('startid'); ?>" /> | |||||
到 | |||||
<input type="text" name="endid" id="endid" style="width:30px" | |||||
value="<?php echo $listrule->GetAtt('endid'); ?>" /> | |||||
(填写页码或规律递增数字) | |||||
每页递增: | |||||
<input type="text" name="addv" id="addv" style="width:30px" | |||||
value="<?php echo $listrule->GetAtt('addv'); ?>" /> | |||||
<input type="checkbox" name="usemore" id="usemore" class="np" value="1" onClick="testMore()" | |||||
<?php if($usemore==1) echo " checked='1' "; ?> /> | |||||
启用多栏目通配(#) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id='handset' style='<?php if($usemore==1) echo 'display:none'; ?>'> | |||||
<td height="171">手工指定网址:<br /> | |||||
<span class="STYLE2">在指定了通配规则后有些不能匹配的网址也可以在这里指定。</span><br /></td> | |||||
<td> | |||||
<textarea name="addurls" id="addurls" cols="45" rows="5" | |||||
style="width:80%;height:160px"><?php echo $addurls->GetInnerText(); ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr id='usemoretr' style='<?php if($usemore==0) echo 'display:none'; ?>'> | |||||
<td height="171">多栏目通配规则:<br /> | |||||
<span class="STYLE2"> | |||||
如果目标网站使用单一模板,可以在匹配网址中用"(#)"表示近似网址的差异,然后在通配规则中设定集合,并且可以指定导出栏目。 | |||||
</span> | |||||
<br /> | |||||
</td> | |||||
<td> | |||||
<textarea name="batchrule" id="batchrule" cols="45" rows="5" | |||||
style="width:80%;height:160px"><?php echo (is_object($batchrule) ? trim($batchrule->GetInnerText()) : ''); ?></textarea> | |||||
<br /><span style='color:#666666'>示例格式:[(#)=>labs/list_3; (*)=>1-25; typeid=>7] | |||||
匹配网址:http://www.aaa.com/(#)_(*).html</span> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('arturl');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374">文章网址匹配规则</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="arturl"> | |||||
<td height="76" valign="top" width="100%" bgcolor="#FFFFFF"> | |||||
<table width="100%"> | |||||
<!-- //使用与正则匹配链接模式不大稳定,也不适合初级用户,暂时作为保留项 --> | |||||
<tr style='display:none'> | |||||
<td width="18%">内容网址匹配模式:</td> | |||||
<td width="82%"> | |||||
<input name="urlrule" type="radio" class="np" id="urlrule1" value="area" onclick="selUrlRuleSet()" | |||||
<?php if($listrule->GetAtt('urlrule')=='area') echo " checked='1'"; ?> /> | |||||
指定包含有文章网址的区域(可以获取区域的网址、标题、图片等信息) | |||||
<input type="radio" name="urlrule" id="urlrule2" value="regx" onclick="selUrlRuleSet()" class="np" | |||||
<?php if($listrule->GetAtt('urlrule')=='regx') echo " checked='1'"; ?> /> | |||||
指定网址正则表达式(仅能获得网址信息) | |||||
</td> | |||||
</tr> | |||||
<!--tr id="regxruletr" style="<?php if($listrule->GetAtt('urlrule')=='area') echo "display:none"; ?>"--> | |||||
<tr id="regxruletr" style="display:none"> | |||||
<td height="84">网址的正则表达式:</td> | |||||
<td> | |||||
<textarea name="regxrule" id="regxrule" cols="45" rows="5" | |||||
style="width:80%;height:60px"><?php echo $regxrule->GetInnerText(); ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr id="arearuletr"> | |||||
<td height="84" width="18%">包含有文章网址的区域设置:</td> | |||||
<td width="82%"> | |||||
<table width="90%"> | |||||
<tr> | |||||
<td width="22%" align="center">区域开始的HTML:</td> | |||||
<td width="78%"> | |||||
<textarea name="areastart" id="areastart" cols="45" rows="5" | |||||
style="width:80%;height:60px"><?php echo $areastart->GetInnerText(); ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center">区域结束的HTML:</td> | |||||
<td> | |||||
<textarea name="areaend" id="areaend" cols="45" rows="5" | |||||
style="width:80%;height:60px"><?php echo $areaend->GetInnerText(); ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center">如果链接中含有图片:</td> | |||||
<td> | |||||
<input name="listpic" type="radio" class='np' id="listpic1" value="0" | |||||
<?php if($listrule->GetAtt('listpic')=='0') echo " checked='1'"; ?> /> | |||||
不处理 | |||||
<input type="radio" name="listpic" id="listpic2" class='np' value="1" | |||||
<?php if($listrule->GetAtt('listpic')=='1') echo " checked='1'"; ?> /> | |||||
采集为缩略图 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td rowspan="2" align="center">对区域网址进行再次筛选:<br /> | |||||
(使用正则表达式)</td> | |||||
<td>必须包含: | |||||
<input type="text" name="musthas" id="musthas" style="width:280px" | |||||
value="<?php echo $listrule->GetAtt('musthas'); ?>" /> | |||||
(优先级高于后者) | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td>不能包含: | |||||
<input type="text" name="nothas" id="nothas" style="width:280px" | |||||
value="<?php echo $listrule->GetAtt('nothas'); ?>" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="94" align="center" bgcolor="#FFFFFF"> | |||||
<script language='javascript'> | |||||
selSourceSet(); | |||||
</script> | |||||
| |||||
<input type="submit" name="b12" value="保存并测试" class="coolbg np" style="width:120px" /> | |||||
<input type="submit" name="b" value="仅保存" onclick="form.donext.value='save';" class="coolbg np" | |||||
style="width:80px" /></td> | |||||
</tr> | |||||
</table> | |||||
<table width="98%" border="0" id="adset" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center" | |||||
style="display:none"> | |||||
<tr> | |||||
<td background="images/tbg.gif" bgcolor="#F2F6E5"> | |||||
<table width="400" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr class="top" onClick="showHide('sart');" style="cursor:pointer"> | |||||
<td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td> | |||||
<td width="374">网页内容获取规则</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr id="sart"> | |||||
<td height="113" valign="top" bgcolor="#FFFFFF"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr id='achelp' style="display:none"> | |||||
<td height="60" colspan="3">1、匹配规则:在匹配区域规则中,规则一般为“<font color="#FF0000">起始无重复HTML</font><span | |||||
class="STYLE1">[内容]</span> | |||||
<font color="#FF0000">结尾无重复HTML</font>”(普通匹配,非正则)。<br /> | |||||
2、字段值:如果指定的字段没有指定区域匹配规则,用这个值作为默认值。<br /> | |||||
3、过滤规则:如果有多个规则,用<br /> | |||||
<font color='#6B7360'> | |||||
{dede:trim replace=""}规则一{/dede:trim}<br /> | |||||
{dede:trim replace=""}规则二{/dede:trim}<br /> | |||||
...</font>表示,如果要替换成指定的值,在 replace=""里设置即可 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35"><a href="#" onclick="showHide('achelp')"><img src="images/help.gif" width="16" | |||||
height="16" /></a>预览网址:</td> | |||||
<td> | |||||
<input type="text" name="previewurl" id="previewurl" style="width:90%" | |||||
value="<?php echo $previewurl; ?>" /> | |||||
</td> | |||||
<td> </td> | |||||
</tr> | |||||
<tr> | |||||
<td width="18%" height="60">内容分页导航所在的区域匹配规则:<br /></td> | |||||
<td><textarea name="sppage" rows="3" id="sppage" | |||||
style="width:90%"><?php echo trim($sppage->GetInnerText()); ?></textarea></td> | |||||
<td width="37%"> | |||||
<input name="sptype" type="radio" value="full" class="np" | |||||
<?php if($sppage->GetAtt('sptype')=='full') echo " checked='1'"; ?> /> | |||||
全部列出的分页列表<br /> | |||||
<input type="radio" name="sptype" class="np" value="next" | |||||
<?php if($sppage->GetAtt('sptype')=='next') echo " checked='1'"; ?> /> | |||||
上下页形式或不完整的分页列表<br /> | |||||
<input type="radio" name="sptype" class="np" value="diyrule" | |||||
<?php if($sppage->GetAtt('sptype')=='diyrule') echo " checked='1'"; ?> /> | |||||
分页列表规则 开始: | |||||
<input name="srul" type="text" value="1" size="4" /> | |||||
结束: | |||||
<input name="erul" type="text" value="5" size="4" /></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35" colspan="3" bgcolor="#FBFCE2" id="dyrule"> | |||||
如果设定分页列表规则.可采用地址规则(正则),其中{p}是递增变量,从1开始每次增加1,例如:{path}{file}_{p}{ext}<br /> | |||||
<strong>规则说明:{path}</strong>地址+目录 <strong>{file}</strong>文件 <strong>{ext}</strong>文件扩展名 | |||||
<strong>{p}</strong>分页列表数</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="3" bgcolor="#F9FCEF"> | |||||
<strong>以下为固定的采集项目:</strong>(项目点击可展开/隐藏,内容摘要、关键字、缩略图系统会用正则进行自动匹配) | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"> | |||||
<tr> | |||||
<td width="50%" valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td height="24"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">关键字过滤内容:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="keywordtrim" rows="4" id="keywordtrim" | |||||
style="width:90%"><?php echo $notes['keywordtrim']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td height="24"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">摘要过滤内容:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="descriptiontrim" rows="4" id="descriptiontrim" | |||||
style="width:90%"><?php echo $notes['descriptiontrim']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="50%" valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" onclick="showHide('ttitle')"><b><u>文章标题</u></b></a> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" id="ttitle"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='title' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="match_title" rows="4" id="match_title" | |||||
style="width:90%"><?php echo $notes['title']['match']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"> | |||||
<textarea name="trim_title" cols="20" rows="3" id="trim_title" | |||||
style="width:90%"><?php echo $notes['title']['trim']; ?></textarea> | |||||
</td> | |||||
<td height="63"> | |||||
<input type="button" name="button" id="button" value="常用规则" | |||||
onclick="selTrim('trim_title')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" | |||||
onclick="showHide('twriter')"><b><u>文章作者</u></b></a> </td> | |||||
</tr> | |||||
<tr id="twriter"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='writer' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="match_writer" rows="4" id="match_writer" | |||||
style="width:90%"><?php echo $notes['writer']['match']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"> | |||||
<textarea name="trim_writer" cols="20" rows="3" id="trim_writer" | |||||
style="width:90%"><?php echo $notes['writer']['trim']; ?></textarea> | |||||
</td> | |||||
<td width="29%" height="63"> | |||||
<input type="button" name="button2" id="button2" value="常用规则" | |||||
onclick="selTrim('trim_writer')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" | |||||
onclick="showHide('tsource')"><b><u>文章来源</u></b></a> </td> | |||||
</tr> | |||||
<tr id="tsource"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='source' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="match_source" rows="4" id="match_source" | |||||
style="width:90%"><?php echo $notes['source']['match']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"> | |||||
<textarea name="trim_source" cols="20" rows="3" id="trim_source" | |||||
style="width:90%"><?php echo $notes['source']['trim']; ?></textarea> | |||||
</td> | |||||
<td height="63"> | |||||
<input type="button" name="button4" id="button4" value="常用规则" | |||||
onclick="selTrim('trim_source')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
<td valign="top"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" class="adline"> <a href="#" | |||||
onclick="showHide('tpubdate')"><b><u>发布时间</u></b></a> </td> | |||||
</tr> | |||||
<tr id="tpubdate"> | |||||
<td height="24"> | |||||
<input type='checkbox' name='fields[]' checked='1' value='pubdate' style='display:none' /> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="18%" height="80">匹配规则:</td> | |||||
<td height="20" colspan="2"> | |||||
<textarea name="match_pubdate" rows="4" id="match_pubdate" | |||||
style="width:90%"><?php echo $notes['pubdate']['match']; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td width="53%" height="63"> | |||||
<textarea name="trim_pubdate" cols="20" rows="3" id="trim_pubdate" | |||||
style="width:90%"><?php echo $notes['pubdate']['trim']; ?></textarea> | |||||
</td> | |||||
<td width="29%" height="63"> | |||||
<input type="button" name="button3" id="button3" value="常用规则" | |||||
onclick="selTrim('trim_pubdate')" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<!-- 固定项目结束,下面为自动项目 --> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="55%" height="24" colspan="3" bgcolor="#FBFCE2"> | |||||
<strong>以下是针对模型设置的采集项目:</strong> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
$row = $dsql->GetOne("Select * From `#@__channeltype` where id='{$channelid}' "); | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace('field','<','>'); | |||||
$dtp->LoadString($row['fieldset']); | |||||
foreach($dtp->CTags as $ctag) | |||||
{ | |||||
//采集禁用的字段 | |||||
$notsend = $ctag->GetAtt('notsend'); | |||||
if($notsend==1) continue; | |||||
$fieldtype = $ctag->GetAtt('type'); | |||||
$tname = $ctag->GetTagName(); | |||||
$iname = $ctag->GetAtt('itemname'); | |||||
if(isset($notes[$tname]['item'])) | |||||
{ | |||||
$tvalue = $notes[$tname]['item']->GetAtt('value'); | |||||
$tisunit = $notes[$tname]['item']->GetAtt('isunit'); | |||||
$tisdown = $notes[$tname]['item']->GetAtt('isdown'); | |||||
$tmatch = $notes[$tname]['match']; | |||||
$ttrim = $notes[$tname]['trim']; | |||||
$tfunction = $notes[$tname]['function']; | |||||
}else { | |||||
$tvalue = $tisunit = $tisdown = $tmatch = $ttrim = $tfunction = ''; | |||||
} | |||||
?> | |||||
<input type='checkbox' name='fields[]' checked='1' value='<?php echo $tname; ?>' style='display:none' /> | |||||
<table width="99%" border="0" cellspacing="0" cellpadding="0" class='autotb' style="margin-top:2px"> | |||||
<tr bgcolor="#EBEFD1"> | |||||
<td width="18%" height="24" bgcolor="#F0F7D9" class="adline"> | |||||
<a href="#" onclick="showHide('t<?php echo $tname; ?>')"><b><u><?php echo $iname; ?></u></b></a> | |||||
</td> | |||||
<td width="12%" bgcolor="#F0F7D9" class="adline"> </td> | |||||
<td width="10%" bgcolor="#F0F7D9" class="adline"><strong>字段值:</strong></td> | |||||
<td bgcolor="#F0F7D9" class="adline"> | |||||
<input name="value_<?php echo $tname; ?>" type="text" value="<?php echo $tvalue; ?>" size="25" | |||||
style="width:250px" /> | |||||
</td> | |||||
</tr> | |||||
<tr id="t<?php echo $tname; ?>"> | |||||
<td height="24" colspan="4"> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td width="16%" height="80">匹配规则:</td> | |||||
<td height="20"> | |||||
<textarea name="match_<?php echo $tname; ?>" rows="4" | |||||
style="width:90%"><?php echo $tmatch; ?></textarea> | |||||
</td> | |||||
<td height="20"> | |||||
<input name="isunit_<?php echo $tname; ?>" type="checkbox" value="1" class="np" | |||||
<?php if($tisunit=='1') echo " checked='checked'"; ?> /> | |||||
分页内容字段(规则中只允许单一的该类型字段)<br /> | |||||
<input name="isdown_<?php echo $tname; ?>" type="checkbox" value="1" class="np" | |||||
<?php if($tisdown=='1') echo " checked='checked'"; ?> /> | |||||
下载字段里的多媒体资源 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="63">过滤规则:</td> | |||||
<td height="63"> | |||||
<textarea name="trim_<?php echo $tname; ?>" cols="20" rows="3" id="trim_<?php echo $tname; ?>" | |||||
style="width:90%"><?php echo $ttrim; ?></textarea> | |||||
</td> | |||||
<td height="63"> | |||||
<input type="button" name="button<?php echo $tname; ?>" id="button<?php echo $tname; ?>" | |||||
value="常用规则" onclick="selTrim('trim_<?php echo $tname; ?>')" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="18%" height="60">自定义处理接口:</td> | |||||
<td width="52%" height="20"> | |||||
<textarea name="function_<?php echo $tname; ?>" cols="20" rows="3" | |||||
style="width:90%"><?php echo $tfunction; ?></textarea> | |||||
</td> | |||||
<td width="30%" height="20"> | |||||
<?php | |||||
if($fieldtype=='htmltext' || $fieldtype=='img') | |||||
{ | |||||
?> | |||||
函数或程序的变量<br /> | |||||
@body 表示原始网页 @litpic 缩略图<br /> | |||||
@me 表示当前标记值和最终结果 | |||||
<?php | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php } ?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="52" align="center" bgcolor="#FFFFFF"> | |||||
<input type="submit" name="b13" value="仅保存" onclick="form.donext.value='save';" class="coolbg np" | |||||
style="width:80px" /> | |||||
| |||||
<input type="submit" name="b12" value="保存并测试" class="coolbg np" style="width:120px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,117 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
<title>采集内容导出</title> | |||||
</head> | |||||
<body background="images/allbg.gif" leftmargin="8" topmargin="8"> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<form name="form1" action="co_export.php" method="get" target="stafrm"> | |||||
<input type="hidden" name="nid" value="<?php echo $nid?>" /> | |||||
<input type="hidden" name="totalcc" value="<?php echo $totalcc?>" /> | |||||
<input type="hidden" name="channelid" value="<?php echo $channelid?>" /> | |||||
<input type="hidden" name="dopost" value="done" /> | |||||
<tr> | |||||
<td height="28" colspan="3" background='images/tbg.gif' style="padding-left:10px;"><strong><a href="co_main.php"><u>采集管理</u></a> | |||||
> 采集内容导出:</strong></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="3" bgcolor="#F8FCF1"> | |||||
<strong>共有[<?php echo $totalcc; ?>]条可导出数据:</strong> | |||||
<?php | |||||
if(empty($nid)) | |||||
{ | |||||
echo "<br /><font color='red'>你当进行的操作是--导出所有采集内容,需注意下面问题:<br />\r\n"; | |||||
echo "1 、如果你采集的内容包含多个内容模型的信息,本操作将会出错!<br />\r\n"; | |||||
echo "2 、这种模式'完成后自动生成导入内容HTML'功能无效。\r\n"; | |||||
echo "</font>"; | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="26%" height="24" align="center" bgcolor="#FFFFFF">默认导出栏目:</td> | |||||
<td width="74%" colspan="2" bgcolor="#FFFFFF"> | |||||
<?php | |||||
$typeOptions = GetOptionList(0,$cuserLogin->getUserChannel(),$channelid); | |||||
echo "<select name='typeid' style='width:300px'>\r\n"; | |||||
echo "<option value='0' selected>请选择主分类...</option>\r\n"; | |||||
echo $typeOptions; | |||||
echo "</select>"; | |||||
?> | |||||
(请选择白色的栏目) | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center" bgcolor="#FFFFFF"> | |||||
批量采集选项: | |||||
</td> | |||||
<td colspan="2" bgcolor="#FFFFFF"> | |||||
<input name="autotype" type="checkbox" id="autotype" value="1" class="np"<?php if($usemore==1 || empty($nid)) echo " checked='1' "; ?>/> | |||||
使用采集规则中指定的栏目ID(如果目标的栏目ID为0,则用上面选择的栏目) | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center" bgcolor="#FFFFFF">发布选项:</td> | |||||
<td colspan="2" bgcolor="#FFFFFF"> | |||||
<input name="arcrank" type="radio" class="np" value="0" checked='1' /> | |||||
普通文档 | |||||
<input name="arcrank" type="radio" class="np" value="-1" /> | |||||
保存为草稿 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center" bgcolor="#FFFFFF">每批导入:</td> | |||||
<td colspan="2" bgcolor="#FFFFFF"> | |||||
<input name="pagesize" type="text" id="pagesize" value="60" style="width:30px" /> 条 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center" bgcolor="#FFFFFF">附带选项:</td> | |||||
<td colspan="2" bgcolor="#FFFFFF"> | |||||
<input name="onlytitle" type="checkbox" id="onlytitle" value="1" class="np" /> | |||||
排除重复标题 | |||||
<input name="makehtml" type="checkbox" id="makehtml" value="1" class="np" /> | |||||
完成后自动生成导入内容HTML | |||||
<input name="usetitle" type="checkbox" id="usetitle" value="1" class="np" /> | |||||
使用列表索引的标题 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center" bgcolor="#FFFFFF">随机推荐:</td> | |||||
<td colspan="2" bgcolor="#FFFFFF"> | |||||
<input name="randcc" type="text" id="randcc" value="12" style="width:30px" /> | |||||
(0 表示不推荐,具体数值表示大约多少篇文档出现一篇推荐[随机]) | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="3" bgcolor="#F8FCF1"> </td> | |||||
</tr> | |||||
<tr> | |||||
<td height="34" colspan="3" align="center" bgcolor="#FFFFFF"> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np" /> | |||||
| |||||
<a href="co_main.php"><img src="images/button_back.gif" width="60" height="22" border="0" /></a> | |||||
</td> | |||||
</tr> | |||||
</form> | |||||
<tr> | |||||
<td height="34" colspan="3" align="center" bgcolor="#F9FCEF"> | |||||
<table width="100%"> | |||||
<tr> | |||||
<td width="74%" align="left">进行状态: </td> | |||||
<td width="26%" align="right"></td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="150" colspan="3" bgcolor="#FFFFFF" id="mtd"> | |||||
<iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="300"></iframe> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<p> </p> | |||||
</body> | |||||
</html> |
@@ -1,129 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集节点</title> | |||||
<script language='javascript'> | |||||
function SubmitNew() | |||||
{ | |||||
document.form1.totalnum.value = "0"; | |||||
document.form1.submit(); | |||||
} | |||||
</script> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td height="20" colspan="2" background='images/tbg.gif'> | |||||
<table width="98%" border="0" cellpadding="0" cellspacing="0"> | |||||
<form name='form2' action='co_url.php' target='stafrm'> | |||||
<input type='hidden' name='small' value='1'> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>'> | |||||
</form> | |||||
<tr> | |||||
<td width="30%" height="18" style="padding-left:10px;"> | |||||
<strong><?php echo $ntitle; ?></strong> | |||||
</td> | |||||
<td width="70%" align="right"> | |||||
<input type="button" name="b11" value="查看已下载" class="coolbg np" onClick="document.form2.submit();" style="width:90px" /> | |||||
<input type="button" name="b12" value="采集节点管理" class="coolbg np" style="width:90px" onClick="location.href='co_main.php';" /> | |||||
<input type="button" name="b13" value="导出数据" class="coolbg np" style="width:90px" onClick="location.href='co_export.php?nid=<?php echo $nid; ?>';" /> | |||||
</td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
<tr> | |||||
<td width="108" valign="top" bgcolor="#FFFFFF">节点名称:</td> | |||||
<td width="377" valign="top" bgcolor="#FFFFFF"> | |||||
<?php | |||||
if(!empty($nid)) echo $co->noteInfos['notename']; | |||||
else echo "所有节点"; | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">种子网址数:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<?php echo $unum; ?> | |||||
</td> | |||||
</tr> | |||||
<form name="form1" action="co_getsource_url_action.php" method="get" target='stafrm'> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>' /> | |||||
<input type='hidden' name='totalnum' value='<?php echo $row['dd']; ?>' /> | |||||
<input type='hidden' name='startdd' value='0' /> | |||||
<tr> | |||||
<td height="20" bgcolor="#FFFFFF">每页采集:</td> | |||||
<td height="20" bgcolor="#FFFFFF"> | |||||
<input name="pagesize" type="text" id="pagesize" value="5" size="3" /> | |||||
条, | |||||
间隔时间: | |||||
<input name="sptime" type="text" id="sptime" value="0" size="3" /> | |||||
秒(防刷新的站点需设置) | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" bgcolor="#FFFFFF">特殊选项:</td> | |||||
<td height="20" bgcolor="#FFFFFF"> | |||||
<input name="notckpic" type="checkbox" class="np" /> | |||||
不检测重复图片 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" bgcolor="#FFFFFF">附加选项:</td> | |||||
<td height="20" bgcolor="#FFFFFF"> | |||||
<input name="islisten" type="radio" class="np" value="1" <?php if(empty($nid)) echo " checked='1' "; ?> /> | |||||
监控采集模式(检测当前或所有节点是否有新内容) | |||||
<?php | |||||
if(!empty($nid)) { | |||||
?> | |||||
<br /> | |||||
<input name="islisten" type="radio" class="np" value="-1" checked='1'; /> | |||||
重新下载全部内容 | |||||
<br /> | |||||
<input name="islisten" type="radio" class="np" value="0" /> | |||||
下载种子网址的未下载内容 | |||||
<br /> | |||||
<?php | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="28" colspan="2" bgcolor="#ffffff" align="center"> | |||||
<input name="b112" type="button" class="coolbg np" value="开始采集网页" onClick="document.form1.submit();" style="width:100px" /> | |||||
<input name="b113" type="button" class="coolbg np" value="查看种子网址" onClick="document.form2.submit();" style="width:100px" /> | |||||
</td> | |||||
</tr> | |||||
</form> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="20" colspan="2"> | |||||
<table width="100%"> | |||||
<tr> | |||||
<td width="74%">节点的种子网址: </td> | |||||
<td width="26%" align="right"> | |||||
<script language='javascript'> | |||||
function ResizeDiv(obj,ty) | |||||
{ | |||||
if(ty=="+") document.all[obj].style.pixelHeight += 50; | |||||
else if(document.all[obj].style.pixelHeight>80) document.all[obj].style.pixelHeight = document.all[obj].style.pixelHeight - 50; | |||||
} | |||||
</script> | |||||
[<a href='#' onClick="ResizeDiv('mdv','+');">增大</a>] [<a href='#' onClick="ResizeDiv('mdv','-');">缩小</a>] | |||||
</td> | |||||
</tr> | |||||
</table></td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td colspan="2" id="mtd"> | |||||
<div id='mdv' style='width:100%;height:350px;'> | |||||
<iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"<?php if($row['dd']>0) echo " src=co_url.php?nid=$nid&small=1";?>></iframe> | |||||
</div> | |||||
<script language="JavaScript"> | |||||
document.all.mdv.style.pixelHeight = screen.height - 360; | |||||
</script> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,198 +0,0 @@ | |||||
{dede:config.pagesize value="20"/} | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集节点管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<script language="javascript" src="js/context_menu.js"></script> | |||||
<script language="javascript" src="js/ieemu.js"></script> | |||||
<script language="javascript"> | |||||
if (moz) { | |||||
extendEventObject(); | |||||
extendElementModel(); | |||||
emulateAttachEvent(); | |||||
} | |||||
//编辑节点 | |||||
function EditNote(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_edit.php?nid=" + nid; | |||||
} | |||||
//编辑节点配置 | |||||
function EditNoteText(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_edit_text.php?nid=" + nid; | |||||
} | |||||
//清空节点 | |||||
function ClearNote(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_do.php?dopost=clear&nid=" + nid; | |||||
} | |||||
//删除节点 | |||||
function DelNote(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
if (window.confirm('你确定要删除这个节点吗?')) { location.href = "co_do.php?dopost=delete&nid=" + nid; } | |||||
} | |||||
//查看已下载的内容 | |||||
function ViewDown(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
location.href = "co_url.php?nid=" + nid; | |||||
} | |||||
//测试规则 | |||||
function TestRule(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_test_rule.php?nid=" + nid; | |||||
} | |||||
//导出采集 | |||||
function ExportDown(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_export.php?nid=" + nid;; | |||||
} | |||||
//导入规则 | |||||
function GetRule() { | |||||
location.href = "co_get_corule.php"; | |||||
} | |||||
//导出规则 | |||||
function ExportRule(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_export_corule.php?nid=" + nid; | |||||
} | |||||
//采集所选节点 | |||||
function GatherSel(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_gather_start.php?nid=" + nid; | |||||
} | |||||
//复制所选节点 | |||||
function CopyNote(nid) { | |||||
if (nid == "") nid = getOneItem(); | |||||
if (nid == "") { alert("请选择一个节点!"); return; } | |||||
location.href = "co_do.php?dopost=copy&nid=" + nid; | |||||
} | |||||
//上下文菜单 | |||||
function ShowMenu(evt, obj, nid) { | |||||
var eobj, popupoptions | |||||
popupoptions = [ | |||||
new ContextItem("测试当前节点", function () { TestRule(nid); }), | |||||
new ContextItem("采集当前节点", function () { GatherSel(nid); }), | |||||
new ContextSeperator(), | |||||
new ContextItem("更改当前节点", function () { EditNote(nid); }), | |||||
new ContextItem("更改节点配置", function () { EditNoteText(nid); }), | |||||
new ContextSeperator(), | |||||
new ContextItem("查看采集内容", function () { ViewDown(nid); }), | |||||
new ContextItem("导出采集", function () { ExportDown(nid); }), | |||||
new ContextSeperator(), | |||||
new ContextItem("清空已下载信息", function () { ClearNote(nid); }), | |||||
new ContextItem("删除当前节点", function () { DelNote(nid); }), | |||||
new ContextSeperator(), | |||||
new ContextItem("复制当前节点", function () { CopyNote(nid); }), | |||||
new ContextSeperator(), | |||||
new ContextItem("导出配置规则", function () { ExportRule(nid); }), | |||||
new ContextItem("关闭菜单(<u>C</u>)", function () { }) | |||||
] | |||||
ContextMenu.display(evt, popupoptions) | |||||
} | |||||
//获得选中其中一个的id | |||||
function getOneItem() { | |||||
var allSel = ""; | |||||
if (document.form1.nids.value) return document.form1.nids.value; | |||||
for (i = 0; i < document.form1.nids.length; i++) { | |||||
if (document.form1.nids[i].checked) { | |||||
allSel = document.form1.nids[i].value; | |||||
break; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
</script> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8' onLoad="ContextMenu.intializeContextMenu()"> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center" class="table maintable table-bordered mt-3"> | |||||
<tr> | |||||
<td height="20" colspan="7" background='images/tbg.gif'> | |||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-borderless"> | |||||
<tr> | |||||
<td width="20%" height="18" style="padding-left:10px;"><strong>采集节点管理:</strong></td> | |||||
<td width="80%" align="right"> | |||||
<input type="button" name="ba" value="添加新节点" onClick="location='co_add.php?action=select';" | |||||
class="coolbg np" style="width:100px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" height="26" bgcolor="#FBFCE2"> | |||||
<td width="8%">选择</td> | |||||
<td width="32%">节点名称</td> | |||||
<td width="18%">针对规则</td> | |||||
<td width="10%">最后采集日期</td> | |||||
<td width="10%">加入日期</td> | |||||
<td width="10%">编码</td> | |||||
<td width="10%">网址数</td> | |||||
</tr> | |||||
<form name="form1"> | |||||
{dede:datalist} | |||||
<tr bgcolor="#FFFFFF" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" | |||||
oncontextmenu="ShowMenu(event,this,{dede:field.nid /});"> | |||||
<td><input type='checkbox' name='nids' value='{dede:field.nid /}' class='np'></td> | |||||
<td><a href='co_url.php?nid={dede:field.nid /}'>{dede:field.notename /}</a></td> | |||||
<td>{dede:field.typename /}</td> | |||||
<td>{dede:field.cotime function='GetDatePage(@me)' /}</td> | |||||
<td>{dede:field.uptime function='GetDatePage(@me)' /}</td> | |||||
<td>{dede:field.sourcelang /}</td> | |||||
<td>{dede:field.nid function='TjUrlNum(@me)' /}</td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
</form> | |||||
<tr bgcolor="#ffffff"> | |||||
<td height="24" colspan="7"> | |||||
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="table-borderless"> | |||||
<tr> | |||||
<td> | |||||
| |||||
<a href="#" onClick="location='co_add.php?action=select';" class='coolbg np'>增加新节点</a> | |||||
<a href="javascript:GetRule();" class='coolbg np'>导入配置</a> | |||||
<a href="javascript:ExportRule('');" class='coolbg np'>导出配置</a> | |||||
| | |||||
<a href="javascript:GatherSel('');" class='coolbg np' style='color:red'>采集</a> | |||||
<a href="javascript:ExportDown('');" class='coolbg np'>导出数据</a> | |||||
| | |||||
<a href="javascript:EditNote('');" class='coolbg np'>更改</a> | |||||
<a href="javascript:EditNoteText('');" class='coolbg np'>更改配置</a> | |||||
<a href="javascript:TestRule('');" class='coolbg np'>测试</a> | |||||
| | |||||
<a href="javascript:ViewDown('');" class='coolbg np'>查看已下载</a> | |||||
| | |||||
<a href="javascript:CopyNote('');" class='coolbg np'>复制</a> | |||||
<a href="javascript:ClearNote('');" class='coolbg np'>清空</a> | |||||
| | |||||
<a href="javascript:DelNote('');" class='coolbg np'>删除</a> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" colspan="7" align="center"> | |||||
{dede:pagelist size='5' /} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,93 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>测试节点</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | |||||
<body background="images/allbg.gif" leftmargin="8" topmargin="8"> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td height="20" background='images/tbg.gif'> | |||||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | |||||
<tr> | |||||
<td width="30%" height="18" style="padding-left:10px;"><strong>测试节点:</strong></td> | |||||
<td width="70%" align="right"> | |||||
<input type="button" name="b115" value="开始采集" class="coolbg np" style="width:120px" | |||||
onClick="location='co_gather_start.php?nid=<?php echo $nid; ?>';" /> | |||||
<input type="button" name="b11" value="返回采集节点管理页" class="coolbg np" style="width:160" | |||||
onClick="location.href='co_main.php';" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="94" bgcolor="#FFFFFF" align="center"> | |||||
<table width="98%" border="0"> | |||||
<tr bgcolor="#FBFCE2"> | |||||
<td width="13%" height="24" align="center"><b>节点名称:</b></td> | |||||
<td width="87%" align="left"> <?php echo($co->noteInfos['notename']); ?></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" align="center">列表测试信息:</td> | |||||
<td> </td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="2"> | |||||
<textarea name="r1" id="r1" style="width:99%;height:250px"><?php | |||||
$testurl = ''; | |||||
$turls = $co->Testlists($testurl); | |||||
echo "测试的列表网址: $testurl\r\n"; | |||||
if(isset($turls[0]['link'])) | |||||
{ | |||||
$turl = $turls[0]['link']; | |||||
print_r($turls); | |||||
} else { | |||||
$turl = ''; | |||||
} | |||||
$turl = (!empty($co->artNotes['previewurl']) ? $co->artNotes['previewurl'] : $turl); | |||||
?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24">网页规则测试:</td> | |||||
<td align="left">(DedeCMSV6里时间日期字段一般是整数类型,如果您看到pubdate、senddate是整数,那种属正常的情况)</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="24" colspan="2" align="left"> | |||||
单个网页测试网址: <?php echo "$turl \r\n"; ?> | |||||
<br /> | |||||
<textarea name="r2" id="r2" style="width:99%;height:250px"><?php | |||||
if($turl!=''){ | |||||
echo $co->TestArt($turl); | |||||
} | |||||
else | |||||
{ | |||||
echo "列表规则错误,找不到任何文章网址!"; | |||||
} | |||||
?></textarea> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="60" align="center" bgcolor="#FFFFFF"> | |||||
<input type="button" name="b2" value="重新修改节点配置" class="coolbg np" | |||||
onClick="location='co_edit.php?nid=<?php echo $nid; ?>';" style="width:180px" /> | |||||
| |||||
<input type="button" name="b5" value="确定并开始采集" class="coolbg np" style="width:120px" | |||||
onClick="location='co_gather_start.php?nid=<?php echo $nid; ?>';" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="28" bgcolor="#F9FCEF"> </td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,103 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>规则选择框</title> | |||||
<style type="text/css"> | |||||
* { | |||||
font-size:14px; | |||||
line-height:150%; | |||||
padding:0px; | |||||
margin:0px auto; | |||||
} | |||||
td { padding-left:10px; } | |||||
body { | |||||
margin-top:6px; | |||||
background-color: #E6E4D5; | |||||
} | |||||
.bt | |||||
{ | |||||
height:24px; | |||||
width:60px; | |||||
border-bottom:1px solid #726B36; | |||||
border-right:1px solid #726B36; | |||||
border-left:1px solid #DAD5B1; | |||||
border-top:1px solid #DAD5B1; | |||||
} | |||||
</style> | |||||
<script language='javascript'> | |||||
function SelOK() | |||||
{ | |||||
var okstr = ''; | |||||
var tmpvalue = ''; | |||||
var totalbox = 12; | |||||
var selid = location.search.replace('?',''); | |||||
for(var i=1;i<=totalbox;i++) | |||||
{ | |||||
if(document.getElementById('font'+i).checked) | |||||
{ | |||||
tmpvalue = document.getElementById('font'+i).value; | |||||
tmpvalue = tmpvalue.replace(/</,'<'); | |||||
tmpvalue = tmpvalue.replace(/>/,'>'); | |||||
okstr += (okstr=='' ? "{dede:trim replace=''}"+tmpvalue+"{/dede:trim}" : "\r\n{dede:trim replace=''}"+tmpvalue+"{/dede:trim}"); | |||||
} | |||||
} | |||||
if(okstr!='') | |||||
{ | |||||
var nobj = window.opener.document.getElementById(selid); | |||||
if(nobj != null) nobj.value = (nobj.value=='' ? okstr : "\r\n"+okstr); | |||||
} | |||||
window.opener = true; | |||||
window.close(); | |||||
} | |||||
</script> | |||||
</head> | |||||
<body> | |||||
<form id="form1" name="form1" method="post" action=""> | |||||
<table width="300" border="0" cellpadding="1" cellspacing="1" bgcolor="#BCC083"> | |||||
<tr> | |||||
<td width="149" bgcolor="#FFFFFF"> | |||||
<input name="font1" type="checkbox" id="font1" value="<a([^>]*)>(.*)</a>" /> | |||||
超链接 </td> | |||||
<td width="151" bgcolor="#FFFFFF"><input name="font7" type="checkbox" id="font7" value="<object([^>]*)>(.*)</object>" /> | |||||
Object</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"><input name="font2" type="checkbox" id="font2" value="<script([^>]*)>(.*)</script>" /> | |||||
javascript脚本</td> | |||||
<td bgcolor="#FFFFFF"><input name="font8" type="checkbox" id="font8" value="<embed([^>]*)>(.*)</embed>" /> | |||||
embed</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"><input name="font3" type="checkbox" id="font3" value="<!--(.*)-->" /> | |||||
<!--()--></td> | |||||
<td bgcolor="#FFFFFF"><input name="font9" type="checkbox" id="font9" value="<iframe([^>]*)>(.*)</iframe>" /> | |||||
iframe</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"><input name="font4" type="checkbox" id="font4" value="<table([^>]*)>(.*)</table>" /> | |||||
table</td> | |||||
<td bgcolor="#FFFFFF"><input name="font10" type="checkbox" id="font10" value="<param([^>]*)>(.*)</param>" /> | |||||
param</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"><input name="font5" type="checkbox" id="font5" value="<style([^>]*)>(.*)</style>" /> | |||||
style</td> | |||||
<td bgcolor="#FFFFFF"><input name="font11" type="checkbox" id="font11" value="<div([^.]*)>" /> | |||||
<div([^.]*)></td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"><input name="font6" type="checkbox" id="font6" value="<img([^>]*)>" /> | |||||
img</td> | |||||
<td bgcolor="#FFFFFF"><input name="font12" type="checkbox" id="font12" value="</div>" /> | |||||
</div></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="32" colspan="2" align="center" bgcolor="#FFFFFF"> | |||||
<input type="button" name="sb" id="sb" value="确定" class='bt' onclick="SelOK();" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -1,106 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集内容管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
<script language="javascript"> | |||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() { | |||||
var allSel = ""; | |||||
if (document.form1.aids.value) return document.form1.aids.value; | |||||
for (i = 0; i < document.form1.aids.length; i++) { | |||||
if (document.form1.aids[i].checked) { | |||||
if (allSel == "") | |||||
allSel = document.form1.aids[i].value; | |||||
else | |||||
allSel = allSel + "," + document.form1.aids[i].value; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
function ReSel() { | |||||
for (i = 0; i < document.form1.aids.length; i++) { | |||||
if (document.form1.aids[i].checked) document.form1.aids[i].checked = false; | |||||
else document.form1.aids[i].checked = true; | |||||
} | |||||
} | |||||
function DelSel() { | |||||
var nid = getCheckboxItem(); | |||||
location.href = "co_do.php?dopost=clear&ids=" + nid; | |||||
} | |||||
function DelSel2() { | |||||
var nid = getCheckboxItem(); | |||||
location.href = "co_do.php?dopost=clear&clshash=true&ids=" + nid; | |||||
} | |||||
function ClearCt() { | |||||
var nid = getCheckboxItem(); | |||||
location.href = "co_do.php?dopost=clearct&ids=" + nid; | |||||
} | |||||
</script> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6" align="center" class="table table-bordered maintable mt-3"> | |||||
<tr> | |||||
<td height="28" colspan="8" background='images/tbg.gif'> | |||||
<table width="96%" border="0" cellpadding="0" cellspacing="0" class="table-borderless"> | |||||
<tr> | |||||
<td width="20%" height="18" style="padding-left:10px;"><strong>临时内容管理:</strong></td> | |||||
<td width="80%" align="right"> | |||||
<?php echo $exportbt; ?> | |||||
<input type="button" name="ba2" value="节点管理" class="coolbg np" style="width:80px" | |||||
onClick="location.href='co_main.php';" /> | |||||
<input type="button" name="ba1" value="清空下载内容" class="coolbg np" style="width:100px" | |||||
onClick="location.href='co_do.php?dopost=clearall';" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" height="26" bgcolor="#FBFCE2"> | |||||
<td width="6%">选择</td> | |||||
<td width="30%">内容标题</td> | |||||
<td width="15%">所属节点</td> | |||||
<td width="10%">获取日期</td> | |||||
<td width="8%">下载</td> | |||||
<td width="8%">导出</td> | |||||
<td width="10%">预设栏目</td> | |||||
<td width="8%">来源网页</td> | |||||
</tr> | |||||
<form name="form1"> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';"> | |||||
<td><input type='checkbox' name='aids' value='{dede:field.aid/}' class='np'></td> | |||||
<td><a href='co_view.php?aid={dede:field.aid/}'>{dede:field.title/}</a></td> | |||||
<td><a href='co_edit.php?nid={dede:field.nid/}'>{dede:field.notename/}</a></td> | |||||
<td>{dede:field.dtime function="GetDateMk(@me)" /}</td> | |||||
<td>{dede:field.isdown function="IsDownLoad(@me)" /}</td> | |||||
<td>{dede:field.isex function="IsExData(@me)" /}</td> | |||||
<td>{dede:field.typename /}</td> | |||||
<td><a href='{dede:field.url/}' target='_blank'>[源网址]</a></td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
</form> | |||||
<tr> | |||||
<td height="30" colspan="8" bgcolor="#FCFDF7"> | |||||
<input type="button" name="b11" value="反选" class="coolbg np" style="width:40px" onClick="ReSel();" /> | |||||
<input type="button" name="b12" value="仅删除网址" class="coolbg np" style="width:80px" onClick="DelSel();" /> | |||||
<input type="button" name="b13" value="仅清空内容" class="coolbg np" style="width:80px" onClick="ClearCt();" /> | |||||
<input type="button" name="b14" value="删除网址及历史记录" class="coolbg np" style="width:120px" onClick="DelSel2();" /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="36" colspan="8" bgcolor="#F9FCEF" align="center"> | |||||
{dede:pagelist listsize=5/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,79 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集内容管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
<script language="javascript"> | |||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() { | |||||
var allSel = ""; | |||||
if (document.form1.aids.value) return document.form1.aids.value; | |||||
for (i = 0; i < document.form1.aids.length; i++) { | |||||
if (document.form1.aids[i].checked) { | |||||
if (allSel == "") | |||||
allSel = document.form1.aids[i].value; | |||||
else | |||||
allSel = allSel + "`" + document.form1.aids[i].value; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
function ReSel() { | |||||
for (i = 0; i < document.form1.aids.length; i++) { | |||||
if (document.form1.aids[i].checked) document.form1.aids[i].checked = false; | |||||
else document.form1.aids[i].checked = true; | |||||
} | |||||
} | |||||
function DelSel() { | |||||
var nid = getCheckboxItem(); | |||||
if (nid == "") { | |||||
alert("请选择节点!\r\n"); | |||||
return; | |||||
} | |||||
location.href = "co_do.php?dopost=clear&ids=" + nid; | |||||
} | |||||
</script> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='0' topmargin='0'> | |||||
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6" align="center" class="table maintable table-bordered mt-3"> | |||||
<tr align="center" bgcolor="#FBFCE2"> | |||||
<td width="8%">选择</td> | |||||
<td width="35%">内容标题</td> | |||||
<td width="18%">所属节点</td> | |||||
<td width="18%">获取日期</td> | |||||
<td width="10%">是否下载</td> | |||||
<td width="8%">来源</td> | |||||
</tr> | |||||
<form name='form1'> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF"> | |||||
<td><input type='checkbox' name='aids' value='{dede:field.aid/}' class='np'></td> | |||||
<td><a href='co_view.php?aid={dede:field.aid/}''>{dede:field.title/}</a></td> | |||||
<td>{dede:field.notename/}</td> | |||||
<td>{dede:field.dtime function="GetDateMk(@me)" /}</td> | |||||
<td>{dede:field.isdown function="IsDownLoad(@me)" /}</td> | |||||
<td><a href=' {dede:field.url/}' target='_blank'>[源网址]</a></td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
</form> | |||||
<tr> | |||||
<td height="28" colspan="6" bgcolor="#FCFDF7"> | |||||
<input type="button" name="b7" value="反选" class="coolbg np" style="width:40" onClick="ReSel();"> | |||||
<input type="button" name="b5" value="删除所选网址" class="coolbg np" style="width:100" onClick="DelSel();"> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="30" colspan="6" bgcolor="#FCFDF7" align="center"> | |||||
{dede:pagelist listsize=5/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,113 +0,0 @@ | |||||
<!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=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>采集内容预览</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<form name='form1' action='co_view.php' method='post'> | |||||
<input type='hidden' name='action' value='save' /> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>' /> | |||||
<input type='hidden' name='aid' value='<?php echo $aid; ?>' /> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center"> | |||||
<tr> | |||||
<td height="28" colspan="2" background='images/tbg.gif' style="padding-left:10px;"> | |||||
<a href='co_url.php'><b>采集内容管理</b></a><b> > 采集内容预览:</b>(系统会自动下载并处理未下载过的内容) | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff"> | |||||
<td height="24" colspan="2">如果发布时间(pubdate)为空,系统将采用导入时的实际时间,‘#p#副标题#e#’字样是系统分页符号,请不要替换。</td> | |||||
</tr> | |||||
<tr height="26" bgcolor="#FBFCE2"> | |||||
<td width="17%" height="24" align="center" bgcolor="#F8FCF1"><strong>字段名称</strong></td> | |||||
<td width="83%" align="center" bgcolor="#F8FCF1"><strong>内 容</strong></td> | |||||
</tr> | |||||
<?php | |||||
for($i=0;$i<=$dtp->Count;$i++) | |||||
{ | |||||
$ctag = $dtp->CTags[$i]; | |||||
if($ctag->GetName()=="field") | |||||
{ | |||||
$fname = $ctag->GetAtt("name"); | |||||
$fvalue = $ctag->GetInnerText(); | |||||
?> | |||||
<tr> | |||||
<td height="24" align="center" valign="top" bgcolor="#FFFFFF"> | |||||
<?php echo $fname?> | |||||
<input type='hidden' name='noteid_<?php echo $i?>' value='<?php echo $fname?>' /> | |||||
</td> | |||||
<td bgcolor="#FFFFFF"> | |||||
<?php | |||||
if(strlen($fvalue)<200) echo "<textarea name=\"value_$i\" rows=\"1\" style=\"width:90%\">$fvalue</textarea>"; | |||||
else echo "<textarea name=\"value_$i\" rows=\"12\" style=\"width:90%\">$fvalue</textarea>"; | |||||
?> | |||||
</td> | |||||
</tr> | |||||
<?php | |||||
} | |||||
} | |||||
$dtp->Clear(); | |||||
?> | |||||
<input type='hidden' name='endid' value='<?php echo $i?>' /> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" colspan="2" align="center"> | |||||
<input name="imageField" type="image" src="images/button_save.gif" class="np" width="60" height="22" border="0" /> | |||||
| |||||
<a href="<?php echo $backurl?>"><img src="images/button_back.gif" class="np" width="60" height="22" border="0" /></a> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
<form name='form2' action='co_do.php' method='post'> | |||||
<input type='hidden' name='dopost' value='replace' /> | |||||
<input type='hidden' name='nid' value='<?php echo $nid; ?>' /> | |||||
<input type='hidden' name='aid' value='<?php echo $aid; ?>' /> | |||||
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center" style="margin-top:6px"> | |||||
<tr> | |||||
<td colspan='4' height="28" colspan="2" background='images/tbg.gif' style="padding-left:10px;"> | |||||
<b>内容替换:</b> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff"> | |||||
<td colspan='4' height="24">进行替换时会把当前节点的所有结果在原始内容中进行替换,使用正则表达式模式时,会要求再次确实,请注意使用风险。</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff"> | |||||
<td width='12%'>匹配模式:</td> | |||||
<td colspan='3'> | |||||
<input type='radio' name='regtype' value='string' class='np' checked='1' />完全匹配 | |||||
<input type='radio' name='regtype' value='regex' class='np' />正则表达式 | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff" height="160"> | |||||
<td width='12%'>当前记录<br />原始内容参考:</td> | |||||
<td colspan='3'> | |||||
<textarea name="rs" style="width:96%;height:150px"><?php echo $body; ?></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff" height="70"> | |||||
<td width='12%'> | |||||
要替换的字符串<br /> | |||||
或正则表达式: | |||||
</td> | |||||
<td width='38%'> | |||||
<textarea name="fdstring" style="width:90%;height:60px"></textarea> | |||||
</td> | |||||
<td width='12%'>替换为:</td> | |||||
<td> | |||||
<textarea name="rpstring" style="width:90%;height:60px"></textarea> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#F9FCEF"> | |||||
<td height="24" colspan="4" align="center"> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" class="np" width="60" height="22" border="0" /> | |||||
| |||||
<a href="<?php echo $backurl?>"><img src="images/button_back.gif" class="np" width="60" height="22" border="0" /></a> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
</body> | |||||
</html> |
@@ -153,8 +153,6 @@ echo "<script language='javascript'>var curopenItem = '$openitem';</script>\r\n" | |||||
<div onClick="ShowMainMenu(100)">模块</div> | <div onClick="ShowMainMenu(100)">模块</div> | ||||
</a> <a id='link5' class='mm'> | </a> <a id='link5' class='mm'> | ||||
<div onClick="ShowMainMenu(5)">生成</div> | <div onClick="ShowMainMenu(5)">生成</div> | ||||
</a> <a id='link3' class='mm'> | |||||
<div onClick="ShowMainMenu(3)">采集</div> | |||||
</a> <a id='link6' class='mm'> | </a> <a id='link6' class='mm'> | ||||
<div onClick="ShowMainMenu(6)">会员</div> | <div onClick="ShowMainMenu(6)">会员</div> | ||||
</a> | </a> | ||||