Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Login ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Login ?

    I have gotten a login page constructed and it works correctly (thanks to Rich) and now I am interested in if it is possible for Alpha 5 to show me how is and isn't log in.

    What I am wanting is an audit page, for example I regularly visit a secure webpage, and am an administrator for it. In this webpage is the ability for me too see who has been on and where they have gone.

    I would like to be able to do this on my webpages, after someone logs in it makes a log of when they logged in and stores it so I can review it.

    THe problem is I have no idea how or if this is even possible if someone out there could help me I would appreciate it very much

    Thanks for your time (hope what I am asking for makes sense)
    Dale

    #2
    I have an example of this at my website (address below) under the Products heading, titled "Website Traffic and Audit Trail".
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Cool thank you I will try to make heads and tails of it

      Thanks
      Dale

      Comment


        #4
        Originally posted by jonnielaw
        Cool thank you I will try to make heads and tails of it

        Thanks
        Dale
        I looked at it and it is exactly what I am looking to do. I don't need to be that complex I am looking for something simpler that would give me dates of when users logged in and times, and that is about it, I am not so concerned with what they look at.

        Any ideas on how I might start developing this.

        Any help would be appreciated

        Thanks
        Dale

        Comment


          #5
          You create an A5W page that is called with a5w_include() on each page you want to audit. The A5W page has to write a record to a table in your Alpha application. You can write things like any session variable (such as their login username, session id, etc.).
          Steve Wood
          See my profile on IADN

          Comment


            #6
            If you just want to know 'who logged on, and when', then add something like this to the aftervalidate event for your logindialog:

            cs = session.username + crlf() + session.timestamp
            record_add("<ADB_Path>\was_usage.dbf", cs, 2)

            Where session.username is whatever variable you use in your login dialog for the login id, and was_usage is a table with two fileds to match the two fields in the first line. That gives you who & when, without duration, specific pages visited, etc.
            Steve Wood
            See my profile on IADN

            Comment


              #7
              Cool

              Thanks steve I will try that

              Comment


                #8
                Steve I tried it but couldnt get it too work here is what I have in my
                AfterValidate in my LoginDialog page

                session.__Protected__Logged_In = .t.
                if eval_valid("session.targetUrl") then
                if session.targetURL <> "" then
                Currentform.RedirectTarget = session.targetURL
                else
                currentform.redirectTarget = "Main.a5w"
                end if
                else
                currentform.redirectTarget = "Main.a5w"
                end if

                Where would I put the stuff you gave me to make it work, I made a table with the 2 columns but I can't figure out where to put this in the login dialog:


                cs = session.username + crlf() + session.timestamp
                record_add("<ADB_Path>\was_usage.dbf", cs, 2)


                Thanks for the help Steve,

                Dale

                Comment


                  #9
                  It would go on top of your other statements. Don't forget to replace session.username with whatever YOUR control name is for your login ID. And, be sure the login id control's scope is "Session". And, I used "<ADB_Path>" in my statement, but I have no idea if you have that as an alias in your Profle or if the value is accurate.

                  When you say it doesn't work, what actually happens? What is the error code, etc.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    There was no code error at all. It merely would not add anything to the table i had created. I did have it at the top of my statement, prior to todays posts, but i failed to check and make sure the session.--- was the same as my login.

                    I am not sure what you mean with this "And, be sure the login id control's scope is "Session"."

                    And I know that the "<ADB_Path>" statement works as I have used it elsewhere in my program.


                    Thanks for the all the help.

                    Dale

                    Comment


                      #11
                      Hmm, don't know. You can test the function with something like:

                      cs = "Dale" + crlf() + "01/01/2004"
                      record_add("<ADB_Path>\was_usage.dbf", cs, 2)

                      You could also test that outside of your component, right in the Interactive Window. Also, be sure the timestamp field in your table is a Time field type.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        This works. - follow it.

                        Cut/Pasre/Edit:

                        Code:
                        cs = session.WASDemo.UserName + crlf() + session.timestamp 
                        record_add("<ADB_Path>\was_usage.dbf", cs, 2)
                        
                        if eval_valid("session.WASDemo.targetUrl") then 
                        
                        	if session.WASDemo.targetURL <> "" then 
                        		Currentform.RedirectTarget	= session.WASDemo.targetURL
                        
                            else
                        		response.redirect("alphafivemewelcome.a5w")
                        	end if
                        else
                        		response.redirect("alphafivemewelcome.a5w")
                        	
                        end if  
                        
                        session.WASDemo.FlagIsLoggedIn = .t.
                        Last edited by peteconway; 03-28-2006, 07:11 PM.
                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                          #13
                          Thanks fellas

                          I will see if they work and let you all know

                          Thanks
                          Dale

                          Comment


                            #14
                            OKay Steve tried what you said and this is what has happened:

                            I tried this one

                            cs = "Dale" + crlf() + "01/01/2004"
                            record_add("<ADB_Path>\was_usage.dbf", cs, 2)

                            and it worked fine

                            Now I went and added this to the top of my AfterValidate events

                            cs = session.user_name + crlf() + session.timestamp
                            record_add("<ADB_Path>\was_usage.dbf", cs, 2)

                            And I got this message:

                            Errors in: event.AfterValidate code:
                            Property not found
                            session.User_name subelement not found.

                            I changed the scope from local to session and got this one:

                            Errors in: event.Form Level Validate code:
                            Variable "user_name" not found.

                            Now if I change the scope back to local, save it and try to log in I can log in and it will save it to my usage table, However once I try to log back in I get the first error.

                            This is what is in my Validate area:

                            if user_name = "" .or. password = "" then
                            currentform.has_error = .t.
                            currentform.error_message = "Invalid user name or password."
                            else
                            dim correct_password as c
                            DIM level AS N

                            correct_password = lookup("[PathAlias.ADB_Path]\user_names","user_name=" + quote(user_name),"password")
                            if correct_password = password then
                            level = lookup("[PathAlias.ADB_Path]\user_names","user_name=" + quote(user_name),"level")
                            session.__protected__SecurityLevel = level
                            session.__protected__UserName = user_name
                            ELSE
                            currentform.has_error = .t.
                            currentform.error_message = "Invalid user name or password."
                            end if
                            end if

                            And this is what is in my AfterValidate area:

                            session.__Protected__Logged_In = .t.
                            if eval_valid("session.targetUrl") then
                            if session.targetURL <> "" then
                            Currentform.RedirectTarget = session.targetURL
                            else
                            currentform.redirectTarget = "Main.a5w"
                            end if
                            else
                            currentform.redirectTarget = "Main.a5w"
                            end if

                            Any ideas

                            Thanks
                            Dale

                            Comment


                              #15
                              Check it.

                              is it ....cs = session.user_name + crlf() + session.timestamp

                              or ....cs = session.username + crlf() + session.timestamp

                              Like the error says: Variable "user_name" not found.
                              Insanity: doing the same thing over and over again and expecting different results.
                              Albert Einstein, (attributed)
                              US (German-born) physicist (1879 - 1955)

                              Comment

                              Working...
                              X