<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% If cstr(Request.Form("textfield3"))<>"" Then If Request.form("checkbox") ="1" Then Response.Cookies("Username") = Request.Form("textfield3") Response.Cookies("password") = Request.Form("textfield22") Response.Cookies("rememberme") = "1" Response.Cookies("Username").expires = Date + 365 Response.Cookies("password").expires = Date + 365 Response.Cookies("rememberme").expires = Date + 365 Else Response.Cookies("rememberme") = "" Response.Cookies("Username") = "" Response.Cookies("password") = "" End If End If %> <% ' *** Logout the current user. MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1" If (CStr(Request("MM_Logoutnow")) = "1") Then Session.Contents.Remove("MM_Username") Session.Contents.Remove("MM_UserAuthorization") MM_logoutRedirectPage = "#" ' redirect with URL parameters (remove the "MM_Logoutnow" query param). if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL")) If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_newQS = "?" For Each Item In Request.QueryString If (Item <> "MM_Logoutnow") Then If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&" MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item)) End If Next if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS End If Response.Redirect(MM_logoutRedirectPage) End If %> <% Dim SessionVar__CoName SessionVar__CoName = "4" if (Session("MM_Username") <> "") then SessionVar__CoName = Session("MM_Username") %> <% set SessionVar = Server.CreateObject("ADODB.Recordset") SessionVar.ActiveConnection = MM_Network_STRING SessionVar.Source = "SELECT * FROM Customertable WHERE mno LIKE '" + Replace(SessionVar__CoName, "'", "''") + "'" SessionVar.CursorType = 0 SessionVar.CursorLocation = 2 SessionVar.LockType = 3 SessionVar.Open() SessionVar_numRows = 0 %> <% set MyInfo = Server.CreateObject("ADODB.Recordset") MyInfo.ActiveConnection = MM_Network_STRING MyInfo.Source = "SELECT * FROM MyCompanyInfo" MyInfo.CursorType = 0 MyInfo.CursorLocation = 2 MyInfo.LockType = 3 MyInfo.Open() MyInfo_numRows = 0 %> <% set xtralinks = Server.CreateObject("ADODB.Recordset") xtralinks.ActiveConnection = MM_Network_STRING xtralinks.Source = "SELECT * FROM ExtraLinks" xtralinks.CursorType = 0 xtralinks.CursorLocation = 2 xtralinks.LockType = 3 xtralinks.Open() xtralinks_numRows = 0 %> <% Dim Recordset1__CoName Recordset1__CoName = "0" if (Session("MM_Username") <> "") then Recordset1__CoName = Session("MM_Username") %> <% set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_Network_STRING Recordset1.Source = "SELECT * FROM Customertable WHERE mno LIKE '" + Replace(Recordset1__CoName, "'", "''") + "'" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString MM_valUsername=CStr(Request.Form("textfield3")) If MM_valUsername <> "" Then MM_fldUserAuthorization="AccessLevel" MM_redirectLoginSuccess="#" MM_redirectLoginFailed="?NoID=1" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_Network_STRING MM_rsUser.Source = "SELECT mno, Password" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM CustomerTable WHERE mno='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & Replace(Request.Form("textfield22"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And true Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> Advertising Specialties
 
  Printing  
  Decals
 
  Image Printing Advertising Specialties
 Bookmark this Page 

Customer Service Hotline
(864) 583-8848 OR (800) 662-8096
Credit CardPayPal      

Image Printing • 845 California Ave • Spartanburg, SC 29303
© 1999-2008 Image Printing. All rights reserved. Terms of Service | Privacy Policy
<% SessionVar.Close() %> <% MyInfo.Close() %> <% xtralinks.Close() %> <% Recordset1.Close() %>