<%
	function getIdParent(con,id)
	dim rez
	rez=""
	set rs=server.createObject("adodb.recordset")
	rs.open "select cat_id from items where id=" & id,con
	while not rs.eof
	    if rs.bof then break
	    rez=rs("cat_id").value
	    rs.moveNext
	wend
	rs.close
	set rs=nothing
	if rez="" then rez=0
	getIdParent=rez
    end function

'--------------------------
    set con=server.createObject("adodb.connection")
    con.open Application("Product")
%>
<html>
<body>
<p align=center>
<font >Do you realy want to delete?</font>
</p>
<br>
<hr>
<table align=center>
<tr>
<form action="deleteProduct.asp?id=<%=request("id")%>" method=post><td><input type=submit value="Yes"></td></form>
<form action="admin.asp?id=<%=getIdParent(con,request("id")) %>" method=post><td><input type=submit value="No"></td></form>
</tr>
</table>
</body>
</html>
<%
    con.close
    set rs= nothing
    set con=nothing
%>
