<% sSql = "SELECT * FROM USERS WHERE USERNAME='"&request.QueryString("user")&"'" Set rs = Conn.Execute(sSql) %>
<% Set objFolder = objFSO.GetFolder(Server.MapPath("workers")&"\"&replace(rs("USERNAME"),".","_")&"\") photo=0 For Each objFile in objFolder.Files if photo<1 then %> ">
/<%=replace(objFile.Name," ","%20")%>);">
<% photo=2 end if next%>
A Minha Equipa

<%=rs("NAME")%>
<%=rs("FUNCAO")%>

" style="text-decoration:none;">voltar ao perfil
Concessão
<%=rs("CONCESSAO")%>
Departamento
<%=rs("DEPARTAMENTO")%>
<% if rs("USERNAME")<>rs("CHEFIA") then %>
<% Set objFolder = objFSO.GetFolder(Server.MapPath("workers")&"\"&replace(rs("CHEFIA"),".","_")&"\") photo=0 For Each objFile in objFolder.Files if photo<1 then %> ">
/<%=replace(objFile.Name," ","%20")%>);">
<% photo=2 end if next sSql = "SELECT * FROM USERS WHERE USERNAME='"&rs("CHEFIA")&"'" Set rs1 = Conn.Execute(sSql) %>
<%=rs1("NAME")%>
<%=rs1("FUNCAO")%>
<%end if%> <% if rs("CHEFE")=TRUE then sSql = "SELECT * FROM USERS WHERE COLABORADOR=TRUE AND ACT='1' AND CHEFIA='"&rs("USERNAME")&"' AND DEPARTAMENTO='"&rs("DEPARTAMENTO")&"' AND USERNAME<>'"&rs("USERNAME")&"'" else sSql = "SELECT * FROM USERS WHERE COLABORADOR=TRUE AND ACT='1' AND CHEFIA='"&rs1("USERNAME")&"' AND DEPARTAMENTO='"&rs("DEPARTAMENTO")&"' AND USERNAME<>'"&rs("USERNAME")&"'" end if 'response.Write sSql Set rs = Conn.Execute(sSql) while not rs.eof Set objFolder = objFSO.GetFolder(Server.MapPath("workers")&"\"&replace(rs("USERNAME"),".","_")&"\") photo=0 For Each objFile in objFolder.Files if photo<1 then %>
">
/<%=replace(objFile.Name," ","%20")%>);">
<%=rs("NAME")%>
<%=rs("FUNCAO")%>
<% photo=2 end if next rs.MoveNext wend %>