ASP Source Code

ASP File: vbscript/login/login.asp

 
   ASP Script
   Comments
   HTML and Text


<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Developer Studio">

<title>Document Title</title>
</head>
<body>

<%
uid = Request.Form("Loginid")
pwd = Request.Form("Password")
Set obj = Server.CreateObject("halcyon.demo.NWAuthentication")

'specify Novell tree and context here
tree = "NOVELLTREE" 'tree name
context = "NOVELL01" 'context

res = obj.init(tree, context)
If Not res Then
%>

<font size="5"> <b>
<p>Error while connecting to NDS</p>
</b> </font>
<%
   Response.End
End If

granted = obj.login(uid, pwd)
If granted Then
   ' Gets user information
   names = obj.getNames
   layouts = obj.getLayouts
   lb = LBound(names)
   ub = UBound(names)
%>
 

<p><font color="#0000a0" face="Verdana, Arial, Helvetica" size="4"></font>
<center>
<h3><font color="#0000a0" face="Verdana, Arial, Helvetica" size="4">Object Info</font></h3>
<p></p>
<table border="1" width="100%" cellpadding="5" bordercolorlight="#666666" bordercolordark="#333333">
   <tr align="middle">
     <th><font face="Verdana, arial, helvetica">Name</font></th>
     <th><font face="Verdana, arial, helvetica">Layout</font></th>
   </tr>
  
<%  For i = lb to ub %>   
   <tr align="left">
     <td><font face="Verdana, arial, helvetica"><%=names(i)%>  </font></td>
     <td><font face="Verdana, arial, helvetica"><%=layouts(i)%>  </font></td>
   </tr>
<%
   Next
%>

</table></center>
<%  
Else
%>


<font size="5"> <b>
<p>Authentication failed </p>
</b> </font>
<font size="3">Invalid user name or password </font>

<%
End If
%>

</body>
</html>