Old 13-06-2006, 05:33   #1 (permalink)
paulanthony
mingin dawg baitch
 
paulanthony's Avatar
 
Join Date: Apr 2004
Location: Belfast
Posts: 1,041
Send a message via MSN to paulanthony
file last updated with cookie?

Anyone know how to do this...I maintain a list of AUTOCAD files which sometimes get changed. I want to highlight the drawings which have changed from the users last visit via css...any pointers appreciated.
  Reply With Quote
Old 13-06-2006, 06:54   #2 (permalink)
MikeMackay
Yes I look angry.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: To the left a bit...
Posts: 924
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
In a nutshell....

- Store a cookie on the users system with the date/time (perhaps Unix epoch time would be best) of their last visit to the page that lists the files.

- Everytime a cad file is updated, store the updated time in the database.

- Have a script display the files from the database and compare the time on the DB with the time in their cookie

- If the time in the DB is greater than the time in their cookie, flag that record/file.

That's pretty much how I'd tackle the problem. Of course it means you'd need to have a database running but that shouldn't be too hard ?

Or are you are reading in a directory list of files straight off the server ? If that is the case, you can retrieve the time of the last change/update from the file info although that method would be slower and more CPU intensive.

- Mike
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8