<% Dim cnDB ' As ADODB.Connection CheckSecurity Set cnDB = OpenDB() Dim rsData ' As ADODB.Recordset Dim strURL ' As String Dim strSQL ' As String Dim strTitle ' As String strTitle = "View Links" Dim lngGrandParentGroupID Dim lngParentGroupID Dim strParentGroupName Dim lngCurrentGroupID Dim strCurrentGroupName Dim lngChildGroupID Dim strChildGroupName Dim lngAccountID ' As Long lngAccountID = Request.Cookies("mynetwork")("AID") Dim strReturnToPage strReturnToPage = "links" Dim i Dim iMod i = 0 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Define lngParentGroupID and lngCurrentGroupID as the lowest ' pkGroupID if there is no CTID passed to the page. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If Request(CTID) <> "" Then lngParentGroupID = Request(PTID) lngCurrentGroupID = Request(CTID) Else Dim rsMin ' As ADODB.Recordset Dim strSQL2 ' As String strSQL2 = "SELECT Min(tblGroups.ParentGroupID) " _ & "FROM tblGroups WHERE tblGroups.pkAccountID like " _ & lngAccountID Set rsMin = cnDB.Execute(strSQL2) lngParentGroupID = rsMin(0).Value lngCurrentGroupID = rsMin(0).Value rsMin.Close Set rsMin = Nothing End If ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Select the Parent Level Group ' WHERE pkGroupID = pti ' ''''''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM tblGroups " _ & "WHERE pkGroupID = " & lngParentGroupID _ & " AND pkAccountID like " & lngAccountID Set rsData = cnDB.Execute(strSQL) strParentGroupName = rsData("GroupName") lngGrandParentGroupID = rsData("ParentGroupID") rsData.Close set rsData = Nothing ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Select the Current Group ' WHERE ParentGroupID = pti AND pkGroupID = cti ' ''''''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM tblGroups " _ & "WHERE ParentGroupID = " & lngParentGroupID _ & " AND pkGroupID = " & lngCurrentGroupID _ & " AND pkAccountID like " & lngAccountID Set rsData = cnDB.Execute(strSQL) strCurrentGroupName = rsData("GroupName") rsData.Close set rsData = Nothing WL "" & strTitle & "" '''''''''''''''''''''''''''''''''''''''''''''' ' Display the Create New Link and Group links ' and the Search Box. ' '''''''''''''''''''''''''''''''''''''''''''''' '
is only needed if a search box is added ' WL "" WL "

Create New Link  " WL "Create New Folder" ' WL "

" ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Create table for Groups and Links ' ''''''''''''''''''''''''''''''''''''''''''''''''''' WL "" '''''''''''''''''''''''''''''''''''''''''''''' ' Show Parent Level Group ' ''''''''''''''''''''''''''''''''''''''''''''''' WL "" WL "" WL "" '''''''''''''''''''''''''''''''''''''''''''''' ' Show Current Level Group ' ''''''''''''''''''''''''''''''''''''''''''''''' WL "" WL "" WL "" ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Select the Child Level Groups ' WHERE ParentGroupID = cti ' ''''''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM tblGroups " _ & "WHERE ParentGroupID = " & lngCurrentGroupID _ & " AND pkAccountID like " & lngAccountID _ & " ORDER BY GroupName" Set rsData = cnDB.Execute(strSQL) ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Cycle through all of the Child Level Groups indented ' ''''''''''''''''''''''''''''''''''''''''''''''''''' Do Until rsData.EOF If rsData("pkGroupID") <> lngParentGroupID Then '''''''''''''''''''''''''''' ' set row background colors '''''''''''''''''''''''''''' i = i + 1 iMod = i Mod 2 If iMod = 0 Then WL "" Else WL "" End If WL "" WL "" WL "" End If rsData.MoveNext Loop rsData.Close Set rsData = Nothing ''''''''''''''''''''''''''''''''''''''''''''''''''' ' Selects all of the Links where the pkGroupID ' is the same as the lngCurrentGroupID ' ''''''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM tblLinks " _ & "WHERE pkGroupID = " & lngCurrentGroupID _ & " AND pkAccountID like " & lngAccountID _ & " ORDER BY Name" Set rsData = cnDB.Execute(strSQL) ''''''''''''''''''''''''''''''''''''''''''''''''' ' Cycle through all of the Links at this level ' ''''''''''''''''''''''''''''''''''''''''''''''''' Do Until rsData.EOF '''''''''''''''''''''''''''' ' set row background colors '''''''''''''''''''''''''''' i = i + 1 iMod = i Mod 2 If iMod = 0 Then WL "" Else WL "" End If WL "" WL "" rsData.MoveNext Loop WL "
" WL "" & strParentGroupName & "
" WL "" WL "" & strCurrentGroupName & "
" WL "" WL "" WL "" & rsData("GroupName") & "" WL "U | " WL "D" WL "
" WL "" WL "" WL "" '''''''''''''''''''''''''''''''''''''''''''''' ' Determine if Frequent Contact or not. ' '''''''''''''''''''''''''''''''''''''''''''''' If rsData("Freq") = True Then WL "" Else WL "" End If WL "" _ & rsData("Name") & "" WL "" WL "U | " WL "D" WL "
" rsData.Close Set rsData = Nothing CloseDB cnDB ' close database connections PrintFooter %>