<?php
require("../../class/connect.php");
include("../../class/config.php");
include("../../class/db_sql.php");
$link=db_connect();
$empire=new mysqlquery();
//------------------------------点击
function onclick($id,$bclassid,$classid,$ztid,$enews){
	global $empire,$class_r,$dbtbpre;
	//内容点击
	if($enews=="donews")
	{
		$r=$empire->fetch1("select tbname from {$dbtbpre}enewsclass where classid='$classid'");
		if(!empty($r[tbname]))
		{
			$query="update {$dbtbpre}ecms_".$r[tbname]." set onclick=onclick+1 where id='$id'";
		}
	}
	//栏目点击
	elseif($enews=="doclass")
	{$query="update {$dbtbpre}enewsclass set onclick=onclick+1 where classid='$classid'";}
	//专题点击
	elseif($enews=="dozt")
	{$query="update {$dbtbpre}enewszt set onclick=onclick+1 where ztid='$ztid'";}
	else
	{return "";}
	$sql=$empire->query($query);
}
$id=(int)$_GET['id'];
$bclassid=(int)$_GET['bclassid'];
$classid=(int)$_GET['classid'];
$ztid=(int)$_GET['ztid'];
$enews=$_GET['enews'];
onclick($id,$bclassid,$classid,$ztid,$enews);
db_close();
$empire=null;
?>
