<%@ LANGUAGE="VBSCRIPT" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== strLogin = request.querystring("strLogin") strPassword = request.querystring("strPassword") '----------------------------------------------- 'STORE LOGIN AND PASSWORD IN COOKIES 'Writes a cookie with clearance with the passed 'username and password. This is checked on every 'page in the back_security.asp include. '----------------------------------------------- response.cookies(Application(LICENSENUMBER & "cookiename") & " security")("strLogin") = strLogin response.cookies(Application(LICENSENUMBER & "cookiename") & " security")("strPassword") = strPassword 'We now put a security check in here to pull out the language 'and store it in the cookie strQuery = "SELECT * FROM tblCactuShopLogins WHERE LOGIN_Username = '" & sqlsafe(strLogin) & "' AND LOGIN_Password = '" & sqlsafe(strPassword) & "' AND LOGIN_Live = 'y'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If Not (objRecordSet.BOF and objRecordSet.EOF) Then response.cookies(Application(LICENSENUMBER & "cookiename") & " security")("LOGIN_Language") = objRecordSet("LOGIN_Language") End If objRecordSet.Close 'Get the redirection details from the form strPage = request.QueryString("page") strQS = replace(request.QueryString("qs"), "amp;", "&") 'Make sure the page isn't pointing to a different URL if instr(strPage, "/") > 0 then strPage = "" 'Redirect If strPage = "" then response.redirect("_default.asp") else response.Redirect(strPage & "?" & strQS) end if %>