예제 #1
0
//保存更改
if($action=="save"){
	$dsql = new DedeSql(false);
	$result = "";
	for($i=0;$i < $endid;$i++){
		$result .= "{dede:field name=\\'".${"noteid_$i"}."\\'}".${"value_$i"}."{/dede:field}\r\n";
	}
	$dsql->ExecuteNoneQuery("Update #@__courl set result='$result' where aid='$aid'; ");
	$dsql->Close();
	ShowMsg("成功保存一条记录!",$backurl);
	exit();
}

$dsql = new DedeSql(false);
$dsql->SetSql("Select * from #@__courl where aid='$aid'");
$dsql->Execute();
$row = $dsql->GetObject();
$isdown = $row->isdown;
$nid = $row->nid;
$url = $row->url;
$dtime = $row->dtime;
$body = $row->result;
$dsql->Close();
$fields = array();
if($isdown==0)
{
	$co = new DedeCollection();
	$co->Init();
	$co->LoadFromDB($nid);
	$co->DownUrl($aid,$url);
예제 #2
0
	  $dsql->ExecuteNoneQuery($inQuery);
	  $inQuery = "Delete From #@__co_listenurl where nid='$nid'";
	  $dsql->ExecuteNoneQuery($inQuery);
	  $dsql->Close();
	  ShowMsg("成功清空一个节点采集的内容!","co_main.php");
	  exit();
  }
  else
  {
	  $dsql = new DedeSql(false);
	  $inQuery = "Delete From #@__courl where ";
	  $idsSql = "";
	  $ids = explode("`",$ids);
	  foreach($ids as $id) $idsSql .= "or aid='$id' ";
	  $idsSql = ereg_replace("^or ","",$idsSql);
	  $dsql->SetSql($inQuery.$idsSql);
	  $dsql->ExecuteNoneQuery();
	  $dsql->Close();
	  ShowMsg("成功删除指定的网址内容!",$ENV_GOBACK_URL);
	  exit();
  }
}
//复制节点
/*
function co_copy()
*/
else if($dopost=="copy")
{
	CheckPurview('co_AddNote');
	if(empty($notename))
	{
<?php 
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/../include/pub_collection.php");
if($nid=="") 
{
	ShowMsg("参数无效!","-1");	
	exit();
}
$co = new DedeCollection();
$co->Init();
$co->LoadFromDB($nid);
$dsql = new DedeSql(false);
$dsql->SetSql("Select count(aid) as dd From #@__courl where nid='$nid'");
$dsql->Execute();
$row = $dsql->GetObject();
$dd = $row->dd;
$dsql->Close();
if($dd==0)
{
	$unum = "没有记录或从来没有采集过这个节点!";
}
else
{
	$unum = "共有 $dd 个历史种子网址!<a href='javascript:SubmitNew();'>[<u>更新种子网址,并采集</u>]</a>";
}
require_once(dirname(__FILE__)."/templets/co_gather_start.htm");
$co->Close();

ClearAllLink();
?>