<?php 
require_once("fun/funsql.php");
require_once("fun/funlogic.php");
$nid=@floatval(funstr($_GET["nid"]));
if($nid==''){
  echo tanshow("传值错误","index.php");
}
else{
  $sql=query("select * from ".$dbz."news where id=$nid");
	if($row=fetch($sql)){
	  $sql=query("update ".$dbz."news set counts='".($row["counts"]+1)."' where id=$nid");
	  echo "document.write('".$row["counts"]."');";
	}
}

?>