Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Domains

Status
Not open for further replies.

Hulkster

Technical User
May 25, 2002
3
0
0
GB
I am running a NT 4 domain and a Windows 2000 domain. Both are fully trusted by each other. I have the following home page greeting however it works on the NT4 domain but not the 2k domain. Any ideas?



'Generic Web Part Function. REQUIRED.


Function GetContent(nod)

Dim strHTMLRet ' Output string
Dim UserNameRep
Dim FullName
Dim h


On Error Resume Next

'get username - note this bit of code required because if anonymous then blank string
UserName = request.servervariables("Logon_User")
if Len(UserName) = 0 then
UserName = "Anonymous"
end if

UsernameRep=Replace(ucase(UserName) , "\", "/")
set adsUser = getObject("WinNT://" & UserNameRep)
FullName = adsUser.FullName


' Build up output string
h = Hour(Now)
If h < 12 then
strtime = &quot;Good morning! &quot;
ElseIf h < 18 then
strtime = &quot;Good afternoon! &quot;
Else
strtime = &quot;Good evening! &quot;
End If



strHTMLRet = &quot;<table width=&quot;&quot;475&quot;&quot; border=&quot;&quot;0&quot;&quot; cellpadding=&quot;&quot;1&quot;&quot; background=&quot;&quot;welcome.jpg&quot;&quot; cellspacing=&quot;&quot;0&quot;&quot; align=&quot;&quot;left&quot;&quot;><tr ><td colspan=&quot;&quot;3&quot;&quot; align=&quot;&quot;right&quot;&quot;>&quot; & FormatDateTime(Now(), 1) & &quot;</td></tr>&quot;

strHTMLRet = strHtmlRet & &quot;<tr><td width=&quot;&quot;50&quot;&quot;></td>&quot; & &quot;<td valign=&quot;&quot;top&quot;&quot;><b><br><font color=&quot;&quot;#1a3fa5&quot;&quot;>&quot; & strtime & FullName & &quot;</b>. Welcome to Hulksters Intranet! &quot; & &quot;</font></td><td></td></tr><tr><td colspan=&quot;&quot;3&quot;&quot; height =&quot;&quot;7&quot;&quot;></td></tr><td colspan=&quot;&quot;3&quot;&quot; bgcolor=&quot;&quot;#d6d7ef&quot;&quot; height =&quot;&quot;4&quot;&quot;></td></tr></table>&quot;

'Return string to Dashboard
GetContent = strHtmlRet

End Function

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top