<?
include "config.inc.php";
	$aid=$_GET[aid];
	$type=$_GET[type];
	$sql="update ".$PlusDB->prefix(articles)." set hits=hits+1 where id=$aid";
	$PlusDB->queryF($sql);
	if($type!="hidden"){
		$sql="select hits from ".$PlusDB->prefix(articles)." where id=$aid";
		//trace($sql);
		$row=$PlusDB->query_firstrow($sql);
		$hits=$row[hits];
		echo "document.write(\"$hits\");";
	}
?>