}

//加入附加表
//----------------------------------

$inQuery = "INSERT INTO `{$cts['addtable']}`(aid,typeid,note{$inadd_f}) VALUES ('$arcID','$typeid','$notelist'{$inadd_v});";

if(!$dsql->ExecuteNoneQuery($inQuery)){
	$gerr = $dsql->GetError();
	$dsql->ExecuteNoneQuery("Delete From {$cts['maintable']} where ID='$arcID'");
	$dsql->ExecuteNoneQuery("Delete From `#@__full_search` where aid='$arcID'");
	$dsql->Close();
	ShowMsg("把数据保存到数据库附加表 `{$cts['addtable']}` 时出错,请把相关信息提交给DedeCms官方。".$gerr,"javascript:;");
	exit();
}
$artUrl = getfilenameonly($arcID, $typeid, $senddate, $title, $ismake, $arcrank, 0);

//写入全站搜索索引
$datas = array('aid'=>$arcID,'typeid'=>$typeid,'channelid'=>$channelid,'adminid'=>$adminID,'mid'=>0,'att'=>$arcatt,
               'title'=>$title,'url'=>$artUrl,'litpic'=>$litpic,'keywords'=>$keywords,'pubdate'=>$pubdate,
               'addinfos'=>$description,'uptime'=>$senddate,'arcrank'=>$arcrank);
WriteSearchIndex($dsql,$datas);
unset($datas);
//写入Tag索引
InsertTags($dsql,$tag,$arcID,0,$typeid,$arcrank);
//生成HTML
//---------------------------------
MakeArt($arcID,true,true);
//---------------------------------
//返回成功信息
//----------------------------------
  softsize ='$softsize',
  softlinks ='$urls',
  introduce='$body'{$inadd_f}
where aid='$ID';
";
 
if(!$dsql->ExecuteNoneQuery($addQuery)){
	$gerr = $dsql->GetError();
	$dsql->Close();
	ShowMsg("更新数据库附加表 `{$cts['addtable']}` 时出错,请把相关信息提交给DedeCms官方。".$gerr,"javascript:;");
	exit();
}

//生成HTML
//---------------------------------
$artUrl = getfilenameonly($ID, $typeid, $senddate, $title, $ismake, $arcrank, $money);

//更新全站搜索索引
$datas = array('aid'=>$ID,'typeid'=>$typeid,'channelid'=>$channelid,'adminid'=>$edadminid,'mid'=>$memberid,'att'=>$arcatt,
               'title'=>$title,'url'=>$artUrl,'litpic'=>$litpic,'keywords'=>$keywords,'pubdate'=>$pubdate,
               'addinfos'=>$description,'uptime'=>time(),'arcrank'=>$arcrank);
UpSearchIndex($dsql,$datas);
unset($datas);
//更新Tag索引
UpTags($dsql,$tag,$ID,0,$typeid,$arcrank);
MakeArt($ID,true);
//---------------------------------
//返回成功信息
//----------------------------------
$msg = "
  请选择你的后续操作: