GetOne("Select c.maintable From `#@__full_search` i left join #@__channeltype c on c.ID = i.channelid where i.aid = '$aid'; ",MYSQL_NUM);
if(empty($row[0])) $row[0] = '#@__archives';
$dsql->ExecuteNoneQuery("Update `{$row[0]}` set click=click+1 where ID='$aid'");
$dsql->ExecuteNoneQuery("Update `#@__full_search` set click=click+1 where aid='$aid'");
//更新会员文档浏览数
if(!empty($mid)){
$dsql->ExecuteNoneQuery("Update `#@__member` set pageshow=pageshow+1 where ID='$mid'");
}
//获得计数器值
if(!empty($view)){
$row = $dsql->GetOne("Select click From `{$row[0]}` where ID='$aid'",MYSQL_NUM);
echo "document.write('".$row[0]."');\r\n";
}
$dsql->Close();
exit();
/*----------------
计数器调用说明:
如果想显示点击次数,请增加view参数,即把下面JS调用放到文档模板适当位置
普通计数器为
----------------*/
?>