<% Dim sCurrentPage, sPCMID sCurrentPage = "intranet" sCurrentPage2 = "Intranet" sPCMID = "PCM_INTRANET" %> <% Dim sFullName, sWelcomeText 'Load user information If Len(Request.Cookies("IntranetUser")) = 0 Then Response.Redirect("intranetlogin.asp") Set rs = conDB.Execute("SELECT FullName, WelcomeText FROM IntranetUsers WHERE UserName = '" & Request.Cookies("IntranetUser") & "'") If IsRSEmpty(rs) Then Response.Redirect( "intranelogin.asp") Else sFullName = rs.Fields("FullName") sWelcomeText = rs.Fields("WelcomeText") End If %>

<%=smWelcome%> <%=sFullName%>

<%=sWelcomeText%>


<%=smDocuments%>:

<% ' Show files this user has access to sSQL = "SELECT D.DocFile, D.DocName, D.Description, D.Category FROM Documents D, DocumentsUsers DU, IntranetUsers U WHERE U.UserName = '" & Request.Cookies("IntranetUser") & "' AND DU.UserID = U.UserID AND D.DocumentID = DU.DocumentID AND U.LangID=" & iDefLangID & " ORDER BY Category, OrderShown" Set rs = conDB.Execute(sSQL) With rs sCurrentCat = "" sOldCat = "" bCloseQuote = False If IsRSEmpty(rs) Then Response.Write "

No documents found.

" Else Response.Write "" While Not .EOF If IsNull( .Fields("Category") ) Then sCurrentCat = "" Else sCurrentCat = .Fields("category") End If If sCurrentCat <> sOldCat Then Response.Write "" End If %> <% sOldCat = sCurrentCat .MoveNext Wend Response.Write "
" & .Fields("Category") & "
 <%=rs("DocName")%>
<%=rs("Description")%> <%=.Fields("DocName")%>

" End If End With %>