Mountain Posted May 8, 2013 Posted May 8, 2013 I have a supposedly simple thing I would like to do but I am afraid it is rather difficult Here Goes I have a button on which I would attach a script to allow the user of my file to open a page on the internet. BUT after they have opened it the following needs to happen 1. They can close it and open it again throughout the same calendar day. OR 1. They can try to open it again and a dialog comes up that says you can only do this once per day. I have a list of urls to go to but after they have gone to them they are erased from the database. The trick is using the same button to know if it has already done the script that day. This is a hard one.
MartieH Posted May 8, 2013 Posted May 8, 2013 script checks to see if date field = today's date, if yes - do something else; if no - open url and set date field to today's date.
Mountain Posted May 8, 2013 Author Posted May 8, 2013 That sounds good but is there anyway to make it so no one can cheat on the date buy setting their internal clock forward for example. I just don't know these things. Someone might know here. Thanks for the answer!
No_access Posted May 8, 2013 Posted May 8, 2013 ok... what I would do would be to create a Date field and text field, as they go to those url's enter each url into the text field.. and I would probably use something like if NOT pattercount(textfield;URL) and datefield <> get(currentdate) By doing this they can visit each url 1 time at any time of the day., I would recommend this because you said you have a LIST of URLS.. this can also give you some tracking on what urls are used . as far as worring about someone changing the date, you can use a hidded webviewer to display the date from a specific site or for that matter a simple text file on your own site that is updated daily with only the current date, your script can easily pull the date from that.. this is pretty simple to code, let me know if you want some help...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now