<!--#include file="../lib/base.asp"-->
<!--#include file="../theme.asp"-->
<%
''' EYCMS 人气
''' ==================================================================
	eycms.stophack
	dim id:id=eycms.getint(eycms.fpost("id",0),0)
	if id=0 then
		eycms.echo "0:0:0"
		eycms.die
	end if
	if eycms.loadcookie("content_"&id)<>"" then
		'eycms.echo eycms.loadcookie("content_"&id)
		'eycms.die
	end If
	dim shop_lock:shop_lock=eycms.db.dbloadone("islock","ey_model","tablename='ey_model_pro'")
	dim data
	If shop_lock=1 then
		data=eycms.db.dbload(1,"hits,comments,(select count(1) from ey_order_score where cid=ey_content.id and islock=1)","ey_content","id="&id&"","")
		if ubound(data)<0 then
			eycms.echo "0:0:0"
		else
			eycms.db.dbupdate "ey_content","id="&id&"",array(array("hits",data(0,0)+1,0,0))
			eycms.echo data(0,0)+1&":"&data(1,0)&":"&data(2,0)
			eycms.setcookie "content_"&id,data(0,0)+1&":"&data(1,0)&":"&data(2,0)
		end If
	Else
		data=eycms.db.dbload(1,"hits,comments","ey_content","id="&id&"","")
		if ubound(data)<0 then
			eycms.echo "0:0:0"
		else
			eycms.db.dbupdate "ey_content","id="&id&"",array(array("hits",data(0,0)+1,0,0))
			eycms.echo data(0,0)+1&":"&data(1,0)&":0"
			eycms.setcookie "content_"&id,data(0,0)+1&":"&data(1,0)&":0"
		end if
	End if
	eycms.db.dbclose
%>
