<!--#include virtual="/inc/conn.asp"-->
<%
id=trim(SafeRequest("id"))
cid=trim(SafeRequest("cid"))

if id<>"" then

	ddku=getddku(id)
	
	'if request.Cookies("timed")="" then	response.Cookies("timed")=now()
	
	'	if DateDiff("s",request.Cookies("timed"),now())>15 then
	'	response.Cookies("timed")=""
	'	response.Write "ok"
	'	else
			rs.open "select top 1 aydingdansum,aydingdanzt from "&ddku&" where aydingdansum='"&id&"' and aydingdanzt=1" ,conn,1,1	
			if not(rs.eof) then
			'response.Cookies("timed")=""
			response.Write "ok"
			end if
			rs.close
	'	end if
		
end if


if cid<>"" then
		select case	mid(trim(cid),3,1)
		case "A"
		cwku="aycaiwu"
		case "B"
		cwku="aycaiwu01"
		case "C"
		cwku="aycaiwu02"
		case "D"
		cwku="aycaiwu03"
		case "E"
		cwku="aycaiwu04"
		case "F"
		cwku="aycaiwu05"
		case else
		cwku="aycaiwu"
		end select
	'if request.Cookies("timed")="" then	response.Cookies("timed")=now()
	
	
	'	if DateDiff("s",request.Cookies("timed"),now())>15 then
	'	response.Cookies("timed")=""
	'	response.Write "ok"
	'	else
			rs.open "select top 1 aycailiushui,aycaiwuzt from "&cwku&" where aycailiushui='"&cid&"' and aycaiwuzt=1" ,conn,1,1	
			if not(rs.eof) then
	'		response.Cookies("timed")=""
			response.Write "ok"
			end if
			rs.close
	'	end if
		
end if
%>
