<%
Set menurs = Server.CreateObject("ADODB.Recordset")
menurs.ActiveConnection = MM_growstore_STRING
menurs.Source = "SELECT * FROM grostor.menu WHERE parentid = '0' ORDER BY sortorder"
menurs.CursorType = 0
menurs.CursorLocation = 2
menurs.LockType = 1
menurs.Open()
Set subrs = Server.CreateObject("ADODB.Recordset")
subrs.ActiveConnection = MM_growstore_STRING
subrs.Source = "SELECT * FROM grostor.menu WHERE parentid = '" + Request.QueryString("parentid") + "' ORDER BY sortorder"
subrs.CursorType = 0
subrs.CursorLocation = 2
subrs.LockType = 1
subrs.Open()
Set parentrs = Server.CreateObject("ADODB.Recordset")
parentrs.ActiveConnection = MM_growstore_STRING
parentrs.Source = "SELECT * FROM grostor.menu WHERE id = '" + Request.QueryString("parentid") + "' ORDER BY sortorder"
parentrs.CursorType = 0
parentrs.CursorLocation = 2
parentrs.LockType = 1
parentrs.Open()
if not parentrs.eof then
if parentrs.fields.item("parentid").value <> "0" then
subsparentid = parentrs.fields.item("parentid")
end if
end if
Set subsparentrs = Server.CreateObject("ADODB.Recordset")
subsparentrs.ActiveConnection = MM_growstore_STRING
subsparentrs.Source = "SELECT * FROM grostor.menu WHERE parentid = '" + subsparentid + "' ORDER BY sortorder"
subsparentrs.CursorType = 0
subsparentrs.CursorLocation = 2
subsparentrs.LockType = 1
subsparentrs.Open()
Set haschildren = Server.CreateObject("ADODB.Recordset")
haschildren.ActiveConnection = MM_growstore_STRING
haschildren.Source = "SELECT * FROM grostor.menu WHERE id = '" + Request.QueryString("parentid") + "' ORDER BY sortorder"
haschildren.CursorType = 0
haschildren.CursorLocation = 2
haschildren.LockType = 1
haschildren.Open()
%>