2
OK, I am an ASP programmer converting to the PHP side, and since I didn't get a response, I thought I would share my workaround. I am using this XOOPS as a departmental intranet on a win2k3 server. I first created a default.asp page that reads your NT Login to check against the SQL 2000 DB server to see if you belong in this department if so I pass along a username and general password, if not I send you on to the basic XOOPS start up page that will require them to register in order to login.
le="color: #000000"><?php <% Dim IIS_USER Dim CurrentTime IIS_USER = request.servervariables("LOGON_USER") Session("IIS_USER")= IIS_USER LN = Request.ServerVariables("REMOTE_USER") UserName = LCase(Right(LN, Len(LN) - InStr(1, LN, ""))) set rs=Server.CreateObject("adodb.Recordset") connectme="driver={SQL Server};SERVER=MyServer;DATABASE=MyDatabase_Name;UID=MyUser_ID;PWD=MyPassword;" sqlstmt = "SELECT * FROM Department_Employees WHERE UserName='" & UserName & "'" rs.open sqlstmt, connectme if rs.eof then call pass_on else %> <body onLoad="MyForm1.submit()"> <form method="POST" action="http://MyDomain/xoops/html/user.php" name="MyForm1"> <p><input type="text" name="uname" size="20" value="<%=UserName%>"></p> <p><input type="password" name="pass" size="20" value="<%=12345%>"></p> <input type="hidden" name="xoops_redirect" value="/xoops/html/modules/news/index.php" /><input type="hidden" name="op" value="login" /> <p><input type="submit" value="User Login" /> </p> </form> <% end if function pass_on() response.redirect "http://MyDomain/xoops/html" end function %>
So in essence what happens is when the users navigate to
http://MyDomain which is our local intranet the get redirected to where I want them to go based on if they are part of my department or not.
Again I thought this might be useful to someone else in the future. If you can think of a better way to do this, Please let me know.