<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' check for an abacci cookie if session("uid") = "" then If Request.Cookies("abaccibooks") <> "" Then ' get this user's previous session uid session("uid") = Request.Cookies("abaccibooks")("uid") else ' new user, create a new cookie for them session("uid") = cstr(cdbl(cstr(year(now)) & cstr(month(now)) & cstr(day(now)) & cstr(timer())) * 100) response.Cookies("abaccibooks").expires = Now() + 90 response.Cookies("abaccibooks")("uid") = session("uid") End if end if 'response.write("Request.QueryString: " & Request.QueryString & "
") Dim cmdListCount__list_ID cmdListCount__list_ID = "0" if(session("uid") <> "") then cmdListCount__list_ID = session("uid") %> <% set cmdListCount = Server.CreateObject("ADODB.Command") cmdListCount.ActiveConnection = MM_cnBooks_STRING cmdListCount.CommandText = "dbo.getListCount" cmdListCount.Parameters.Append cmdListCount.CreateParameter("@RETURN_VALUE", 3, 4) cmdListCount.Parameters.Append cmdListCount.CreateParameter("@list_ID", 200, 1,16,cmdListCount__list_ID) cmdListCount.CommandType = 4 cmdListCount.CommandTimeout = 0 cmdListCount.Prepared = true set rsListCount = cmdListCount.Execute rsListCount_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("name")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="../account.asp" MM_redirectLoginFailed="login.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_cnBooks_STRING MM_rsUser.Source = "SELECT * " If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM dbo.cwcAmazonUsers WHERE email='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("password"),"'","''") & "'" 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 ' set any new booklist records (created before logging in during this session) to the real uid Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_cnBooks_STRING MM_editCmd.CommandText = "UPDATE dbo.cwcBooklist SET userID = '" & MM_rsUser.Fields.Item("userID").Value & "' WHERE (userID = '" & session("uid") & "')" MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' now set the uid to the user's correct value session("uid") = MM_rsUser.Fields.Item("userID").Value session("username") = MM_rsUser.Fields.Item("userName").Value ' update out cookie response.Cookies("abaccibooks")("uid") = MM_rsUser.Fields.Item("userID").Value 'response.write "uid =" & MM_rsUser.Fields.Item("userID").Value if MM_valUsername = "di@megalong.com" or MM_valUsername = "pshanks@megalong.com" then session("supervisor") = "true" end if 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 if request.querystring("authorID") <> "" then response.redirect("../authorDetails.asp?authorID=" & request.querystring("authorID")) end if if request.querystring("bookID") <> "" then response.redirect("../book.asp?bookID=" & request.querystring("bookID")) end if response.redirect MM_redirectLoginSuccess End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> Log In to Your Account

Abacci Books:
the world's best literature, free!

Home



Advanced Search
<% if not isnull(rsListCount.Fields.Item("item_count").Value) then %> <% end if %>

FAQ
Login
About Abacci
Contact Us
Links
Site Map
Newsletter

 

 

Log In

<% if CStr(Request.QueryString("accessdenied")) <> "" then %>

Before adding a comment you will need to log in or
">create a new account

<% end if %>
E-mail:
Password:

Forgot your password?

<% MM_LoginAction = "../newaccount.asp" IF Request.QueryString("accessdenied") <>"" Then MM_LoginAction = MM_LoginAction + "?accessdenied=" + Request.QueryString("accessdenied") end if %>

Need an Account?

 

 

Home | Authors | Titles | Categories | Your List | FAQ | Contact Us | Site Map

Site Design: Megalong Multimedia