Welcome to Geeklog, Anonymous Monday, May 06 2024 @ 09:53 am EDT

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&quotWink) = 0 then

If Request.ServerVariables("AUTH_USER&quotWink <> "" Then
strLogonName = UCase(Request.ServerVariables("AUTH_USER&quotWink)
strUser = Right(strLogonName, len(strLogonName) - Instr(strLogonName, "&quotWink)

Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user&quotWink
If Err.number <> 0 then
Session("FullName&quotWink = strLogonName
Else
Session("FullName&quotWink = objUser.FullName
End If

Set objUser = Nothing
End If
If Err.number <> 0 Then Session("FullName&quotWink = strLogonName

End If


%>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<TITLE>MDC</TITLE>
<STYLE TYPE="text/css">
<!--
.clsTitleColor {background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;}
.clsCenterTitleColor {background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;}
.clsHighlightValueColor {font-family: Verdana; font-size: x-small; color: #336699; font-weight: bold;}
.clsCenterHighlightValueColor {text-align: Center; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold;}
.clsValueColor {font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;}
.clsCenterValueColor {text-align: Center; font-family: Verdana; font-size: 10px; border-bottom: 1px solid #808080;}
.clsCenterValueColor1 {text-align: Center; font-family: Verdana; font-size: 10px; font-weight: bold; color: #008080;}
.clsTotalValTitleColor {font-family: Verdana; font-size: 10px;}
.clsTotalVal {background-color: #93BEE2; font-family: Verdana; font-size: 10px; color: #336699; font-weight: bold; text-align: Center;}
-->
</STYLE>

</HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function clock() {

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) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}

else

if (document.all)
if (amOrPm == "AM&quotWink pendule.innerHTML = "Good Morning! ";
if (amOrPm == "PM&quotWink {
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! ";
}

setTimeout("clock()", 1000);
}
// End -->
</script>


<BODY onLoad="clock()">
<P Align="Left" Valign="Top">
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr>
<% If Len(Session("FullName&quotWink) > 0 then %>
<td Class="clsHighlightValueColor" height="20"><span id="pendule"></span> <%=Session("FullName&quotWink%></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>
 Quote

All times are EDT. The time is now 09:53 am.

  • 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