<?php
require "inc.php";

switch($get_act)
{
	case "bk_doc":
	{
		$obj_db->execute("update ".DB_PRE."bk_doc set doc_hits=doc_hits+1 where doc_id='".$get_id."'");
		$obj_result = $obj_db->query("SELECT doc_hits FROM ".DB_PRE."bk_doc where doc_id='".$get_id."'");
		if($obj_rs = $obj_db->fetch_array($obj_result))
			echo "document.write('".$obj_rs["doc_hits"]."');";
		break;
	}
	case "article":
	{
		$obj_db->execute("update ".DB_PRE."article set article_hits=article_hits+1 where article_id='".$get_id."'");
		$obj_result = $obj_db->query("SELECT article_hits FROM ".DB_PRE."article where article_id='".$get_id."'");
		if($obj_rs = $obj_db->fetch_array($obj_result))
			echo "document.write('".$obj_rs["article_hits"]."');";
		break;
	}

}

?>