Welcome to Geeklog, Anonymous Saturday, January 04 2025 @ 11:34 pm EST
Geeklog Forums
help on using Domain login insted of user login
Status: offline
wertjangt
Forum User
Newbie
Registered: 03/01/04
Posts: 13
I'm using geeklog to set up an intranet site for my department. The old intranet site uses network login instead of user login. I've got the asp script that the old site uses can anyone help me on how to change geeklog login function so that it recognized netowrk id instead of user login.Below are the asp codes for the old site:
<%@ Language=VBScript %>
<%
Dim strLogonName
Dim strUser
Dim objUser
Dim strDomain
strDomain = "tmmaster"
'-----------------------------------------------------------------------
'Use Basic/Integrated Authentication
'Based on user logon name, retrieve user's Full Name
'-----------------------------------------------------------------------
On Error Resume Next
If Len(Session("FullName") = 0 then
If Request.ServerVariables("AUTH_USER" <> "" Then
strLogonName = UCase(Request.ServerVariables("AUTH_USER")
strUser = Right(strLogonName, len(strLogonName) - Instr(strLogonName, "")
Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user"
If Err.number <> 0 then
Session("FullName" = strLogonName
Else
Session("FullName" = objUser.FullName
End If
Set objUser = Nothing
End If
If Err.number <> 0 Then Session("FullName" = strLogonName
End If
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<TITLE>MDC</TITLE>
<STYLE TYPE="text/css">
<!--
.clsTitleColor &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;&#125;
.clsCenterTitleColor &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;&#125;
.clsHighlightValueColor &#123;font-family: Verdana; font-size: x-small; color: #336699; font-weight: bold;&#125;
.clsCenterHighlightValueColor &#123;text-align: Center; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;&#125;
.clsValueColor &#123;font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;&#125;
.clsCenterValueColor &#123;text-align: Center; font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;&#125;
.clsCenterValueColor1 &#123;text-align: Center; font-family: Verdana; font-size: 10px; font-weight: bold; color: #008080;&#125;
.clsTotalValTitleColor &#123;font-family: Verdana; font-size: 10px;&#125;
.clsTotalVal &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;&#125;
-->
</STYLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function clock() &#123;
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) &#123;
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
&#125;
else
if (document.all)
if (amOrPm == "AM" pendule.innerHTML = "Good Morning! ";
if (amOrPm == "PM" &#123;
if (hours < 6) pendule.innerHTML = "Good Afternoon! ";
if (hours >= 6 && hours < 8) pendule.innerHTML = "Good Evening! ";
if (hours >= 8) pendule.innerHTML = "Good Night! ";
if (hours == 12) pendule.innerHTML = "Good Afternoon! ";
&#125;
setTimeout("clock()", 1000);
&#125;
// End -->
</script>
<BODY onLoad="clock()">
<P Align="Left" Valign="Top">
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr>
<% If Len(Session("FullName") > 0 then %>
<td Class="clsHighlightValueColor" height="20"><span id="pendule"></span> <%=Session("FullName"%></td>
<% Else %>
<!--<td Class="clsHighlightValueColor" height="20"><span id="pendule"></span>(Error. Cannot Retrieve Information.)</td>-->
<td Class="clsHighlightValueColor" height="25"><span id="pendule"></span> </td>
<% End If %>
</tr>
</table>
</BODY>
</HTML>
<%@ Language=VBScript %>
<%
Dim strLogonName
Dim strUser
Dim objUser
Dim strDomain
strDomain = "tmmaster"
'-----------------------------------------------------------------------
'Use Basic/Integrated Authentication
'Based on user logon name, retrieve user's Full Name
'-----------------------------------------------------------------------
On Error Resume Next
If Len(Session("FullName") = 0 then
If Request.ServerVariables("AUTH_USER" <> "" Then
strLogonName = UCase(Request.ServerVariables("AUTH_USER")
strUser = Right(strLogonName, len(strLogonName) - Instr(strLogonName, "")
Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user"
If Err.number <> 0 then
Session("FullName" = strLogonName
Else
Session("FullName" = objUser.FullName
End If
Set objUser = Nothing
End If
If Err.number <> 0 Then Session("FullName" = strLogonName
End If
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<TITLE>MDC</TITLE>
<STYLE TYPE="text/css">
<!--
.clsTitleColor &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;&#125;
.clsCenterTitleColor &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;&#125;
.clsHighlightValueColor &#123;font-family: Verdana; font-size: x-small; color: #336699; font-weight: bold;&#125;
.clsCenterHighlightValueColor &#123;text-align: Center; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;&#125;
.clsValueColor &#123;font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;&#125;
.clsCenterValueColor &#123;text-align: Center; font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;&#125;
.clsCenterValueColor1 &#123;text-align: Center; font-family: Verdana; font-size: 10px; font-weight: bold; color: #008080;&#125;
.clsTotalValTitleColor &#123;font-family: Verdana; font-size: 10px;&#125;
.clsTotalVal &#123;background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;&#125;
-->
</STYLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function clock() &#123;
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) &#123;
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
&#125;
else
if (document.all)
if (amOrPm == "AM" pendule.innerHTML = "Good Morning! ";
if (amOrPm == "PM" &#123;
if (hours < 6) pendule.innerHTML = "Good Afternoon! ";
if (hours >= 6 && hours < 8) pendule.innerHTML = "Good Evening! ";
if (hours >= 8) pendule.innerHTML = "Good Night! ";
if (hours == 12) pendule.innerHTML = "Good Afternoon! ";
&#125;
setTimeout("clock()", 1000);
&#125;
// End -->
</script>
<BODY onLoad="clock()">
<P Align="Left" Valign="Top">
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr>
<% If Len(Session("FullName") > 0 then %>
<td Class="clsHighlightValueColor" height="20"><span id="pendule"></span> <%=Session("FullName"%></td>
<% Else %>
<!--<td Class="clsHighlightValueColor" height="20"><span id="pendule"></span>(Error. Cannot Retrieve Information.)</td>-->
<td Class="clsHighlightValueColor" height="25"><span id="pendule"></span> </td>
<% End If %>
</tr>
</table>
</BODY>
</HTML>
13
12
Quote
All times are EST. The time is now 11:34 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content