<!--#include File="conn.asp"-->

<% 
 '===========================================================================================
	'软件名称：126 cms 视频影视管理系统
	'程序版权：126电影               '咨询QQ：479025
	'开发作者：magicblack(479025)    '官方网站：http://www.126oo.com/
	'Copyright (C) 2009 - ... 126oo.com  All Rights Reserved.
	'郑重声明:
	'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
	'    2、任何个人或组织不得以盈利为目的发布,修改,本软件及其他副本上一切关于版权的信息；
	'    3、126电影保留此软件的法律追究权利；
'==========================================================================================
%>

<%
response.Charset="GBK"
	Dim action
	action = SafeData("RQ","action",0)
	
	Select case action
		case "hit" : gethit
		case "atriclehit" : getatriclehit
		case else : main
	End Select

	sub gethit
		dim id,result
		id = SafeData("RQ","id",0)
		if isN(id) then WriteEnd "err"
		if not isNum(id) then WriteEnd "safe" else id = clng(id)
		DataBase.UpdateRecord "Tbl_Datas","D_ID = "& id ,Array("D_Hits:D_Hits+1")
		result = Database.GetRecordBySQL("select D_Hits from Tbl_datas where D_ID = " & id)(0)
		response.Write "document.writeln("&result&");"
	end sub
	
	sub getatriclehit
		dim id,result
		id = SafeData("RQ","id",0)
		if isN(id) then WriteEnd "err"
		if not isNum(id) then WriteEnd "safe" else id = clng(id)
		DataBase.UpdateRecord "Tbl_Article","A_ID = "& id ,Array("A_Hits:A_Hits+1")
		result = Database.GetRecordBySQL("select A_Hits from Tbl_Article where A_ID = " & id)(0)
		response.Write "document.writeln("&result&");"
	end sub
	
%>