<!--#include virtual="/inc/conn.asp"-->
<%
response.End()
 
id=trim(SafeRequest("id"))
	
ddku=getddku(id)
			
sql="select * from "&ddku&" where aydingdansum='"&id&"' and aydingdanzt=1" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.Write "0"
response.end 
else

'if trim(rs("aydingdanpass"))<>"" then 
'response.Write "0"
'response.end
'end if

aygooddlid=rs("aygooddlid")
aydingdanuser=rs("aydingdanuser") 
aydingdanka=trim(rs("aydingdanka"))

		set rs2=server.CreateObject("adodb.recordset")
		rs2.open "select aynameid,kamiku from ayname where aynameid="&aydingdanuser&"",conn,1,1 
		kamiku=trim(rs2("kamiku"))
		rs2.close
		
		if clng(aygooddlid)<>0 then
		rs2.open "select aynameid,kamiku from ayname where aynameid="&aygooddlid&"",conn,1,1 
		skamiku=trim(rs2("kamiku"))
		rs2.close
		end if
		
		
end if
rs.close

getkastr=""

dstr=split(aydingdanka,",")
		For sum=0 To Ubound(dstr) 
		
			rs.open "select aykaid,aykayesno,ayka,aykapass from "&kamiku&" where aykaid='"&dstr(sum)&"' and aykayesno=1",conn,1,1
			getkastr=getkastr&trim(rs("ayka"))&","&trim(rs("aykapass"))&"|"
			rs.close
		
		next
		
getkastr=mid(getkastr,1,len(getkastr)-1)
response.Write getkastr
'response.end
%>

