<%response.buffer=true%> <% 'on error resume next 'CIS212 colors: Headers:063D59 A Link:063D59 H Link/CopyRight:99cc66 A Copyright:8CAC28 Bold:004080 diamond = "#003366" Response.Expires = 0 Status = session("Status") First = session("First") message = trim(Session("msg")) Session("msg") = "" if First <> "" then welcome = "" & First & " is logged in!
" welcome = welcome & " Student Profile

" welcome = welcome & " LOGOUT

" else welcome = "

Login on Main Page


" end if dim misc,resources,handouts,expect publM = makeString(aLink,"P","M") publR = makeString(aLink,"P","R") publH = makeString(aLink,"P","H") misc = linkArray(publM,misc,diamond) resources = linkArray(publR,resources,diamond) handouts = linkArray(publH,handouts,diamond) if Status <> "" then if (Status = "Admin") or (Status = "Current") then currM = makeString(aLink,"C","M") currR = makeString(aLink,"C","R") currH = makeString(aLink,"C","H") currE = makeString(aLink,"C","E") misc = linkArray(currM,misc,diamond) resources = linkArray(currR,resources,diamond) handouts = linkArray(currH,handouts,diamond) expect = linkArray(currE,expect,diamond) end if if (Status = "Alum") then alumM = makeString(aLink,"L","M") alumR = makeString(aLink,"L","R") alumH = makeString(aLink,"L","H") misc = linkArray(alumM,misc,diamond) resources = linkArray(alumR,resources,diamond) handouts = linkArray(alumH,handouts,diamond) end if if (Status = "Admin") then 'need to build strings here first! admnM = makeString(aLink,"D","M") misc = linkArray(admnM,misc,diamond) end if end if misc = addTable(misc,"miscellaneous:") handouts = addTable(handouts,"handouts:") resources = addTable(resources,"resources:") expect = addTable(expect,"expectations:") %> Class Navigation Page

 

<% 'write nav with response .Write welcome .Write expect .Write handouts .Write resources .Write misc end with %>

Email: williamnewman@gmail.com

<% function linkArray(myStr,myVar,myColor) 'adds links from classAccess file if myStr <> "" then myArray = split(myStr,"~~~") for x = LBound(myArray) to UBound(myArray) step 4 linkArray = linkArray & " " & myArray(x+2) & "
" & vbCrLf next end if linkArray = myVar & linkArray end function function addTable(myVar,varTitle) 'adds table/header if applicable to links if myVar <> "" then addTable = "" & vbCrLf addTable = addTable & "" & vbCrLf & "
" & vbCrLf addTable = addTable & "

" & varTitle & "

" & vbCrLf addTable = addTable & myVar & vbCrLf addTable = addTable & "

" & vbCrLf else 'addTable = "

 

" end if end function function makeString(myArray,myStatus,mySection) for b = Lbound(myArray) to UBound(myArray) myItem = myArray(b) AccessStatus = instr(myItem,"~~~") 'find first tildes AccessStatus = left(myItem,AccessStatus - 1) 'currSection contains "E,H,M or R" sectionChar = left(AccessStatus,1) if (sectionChar = mySection) then 'check for access accessCheck = instr(AccessStatus,myStatus) if accessCheck > 0 then 'found match! if makeString = "" then makeString = myArray(b) else makeString = makeString & "~~~" & myArray(b) end if end if end if next end function %>