<?php
require_once(dirname(__FILE__)."/config.php");
@set_time_limit(0);
CheckPurview('sys_ArcBatch');
if(empty($dopost)) $dopost = '';

$dsql = new DedeSql(false);

if($dopost=='analyse'){
	$channelid = intval($channelid);
	$maintable = $dsql->getone("select maintable from #@__channeltype where ID=$channelid");
	if(is_array($maintable)){
		$maintable = $maintable['maintable'];
	}else{
		$dsql->close();
		showmsg('频道id不正确,请重新选择频道','javascript:;');
		exit();
	}

	$dsql->SetQuery("Select count(title) as dd,title From $maintable where channel=$channelid group by title order by dd desc limit 0,$pagesize");
	$dsql->Execute();
	$allarc = 0;
	require_once(dirname(__FILE__)."/templets/article_result_same.htm");
	$dsql->Close();
	exit();
}else if($dopost=='delsel'){
	require_once(dirname(__FILE__)."/../include/inc_typelink.php");
	require_once(dirname(__FILE__)."/inc/inc_batchup.php");
	if(empty($titles)){
		$dsql->close();
		header("Content-Type: text/html; charset={$cfg_ver_lang}");