%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<%
// *** Validate request to log in to this site.
var MM_LoginAction = Request.ServerVariables("URL");
if (Request.QueryString!="") MM_LoginAction += "?" + Server.HTMLEncode(Request.QueryString);
var MM_valUsername=String(Request.Form("tbUserId"));
if (MM_valUsername != "undefined") {
var MM_fldUserAuthorization="";
var MM_redirectLoginSuccess="tdgportal.html";
var MM_redirectLoginFailed="default.asp";
var MM_flag="ADODB.Recordset";
var MM_rsUser = Server.CreateObject(MM_flag);
MM_rsUser.ActiveConnection = MM_csTDGUsers_STRING;
MM_rsUser.Source = "SELECT UserID, Password";
if (MM_fldUserAuthorization != "") MM_rsUser.Source += "," + MM_fldUserAuthorization;
MM_rsUser.Source += " FROM users WHERE UserID='" + MM_valUsername.replace(/'/g, "''") + "' AND Password='" + String(Request.Form("tbPassword")).replace(/'/g, "''") + "'";
MM_rsUser.CursorType = 0;
MM_rsUser.CursorLocation = 2;
MM_rsUser.LockType = 3;
MM_rsUser.Open();
if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
// username and password match - this is a valid user
Session("MM_Username") = MM_valUsername;
if (MM_fldUserAuthorization != "") {
Session("MM_UserAuthorization") = String(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value);
} else {
Session("MM_UserAuthorization") = "";
}
if (String(Request.QueryString("accessdenied")) != "undefined" && false) {
MM_redirectLoginSuccess = Request.QueryString("accessdenied");
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginSuccess);
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginFailed);
}
%>
The Diamond Group :: Employee Portal
| Unauthorized use of or access to this area is prohibited. Actual or attempted unauthorized use of or access to such areas may result in criminal and/or civil prosecution. Attempts to access such areas without authorization may be viewed, monitored and recorded and any information obtained may be given to law enforcement organizations in connection with any investigation or prosecution of possible criminal activity on this system. |
© 2009 -
The Diamond Group |