HighDots Forums  

Restrict Access by Time of Day

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Restrict Access by Time of Day in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
John Gaver
 
Posts: n/a

Default Re: Restrict Access by Time of Day - 07-15-2004 , 12:57 AM






On 7/14/04 11:26 PM, in article 2g1cf09iejijtc4pgfafd7a6nbeujlr6ni (AT) 4ax (DOT) com,
"Gary White" <reply (AT) newsgroup (DOT) please> wrote:

Quote:
You said:
Example so that staff can only access the data from 9:00am - 4:30pm?
Sounds like more of a UNIX problem, that anything else. On a UNIX server,
just run a "cron" job that will rename the active directory to a temp name
and rename a holding directory to the active directory name and them reverse
the process, when you want the data to become available again. The holding
directory would contain symbolic links matching the name of each real file,
but the links would all point to an html file that simply tells the users
that access is not allowed now.

The other alternative would be to use a similar process to add a password to
the directory at a certain time and remove the password later. I forget the
name of the files that you have to modify for that purpose, but if you
decide to go that route, and can't find the name, just post the question
here and I will check it out on my Linux box. I normally have it on the tip
of my tongue, but it just slips my mind now.

John Gaver
Action America
(forget everything to contact me direct)

Microsoft: (n) Job security for IT consultants.



Reply With Quote
  #12  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Restrict Access by Time of Day - 07-15-2004 , 07:19 AM






On 15 Jul 2004 in macromedia.dreamweaver, John Gaver wrote:

Quote:
The other alternative would be to use a similar process to add a
password to the directory at a certain time and remove the password
later. I forget the name of the files that you have to modify for
that purpose
..htaccess/.htpasswd Google for them - there's a lot out there on
controlling access using them.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #13  
Old   
Gary White
 
Posts: n/a

Default Re: Restrict Access by Time of Day - 07-15-2004 , 08:22 AM



Brad Lawryk wrote:

Quote:
All the offices and servers are on Pacific Time .... so PST would be
the correct time zone for everything.

So we could use server time. Just create your login page as normal, then
place something like this just before the form:

<?php
$openat="08:00";
$closeat="16:30";
$current=date("H:i");
if($current<$openat | $current>$closeat)
exit("Sorry, system is not available. ".
"Hours of operation are from $openat to $closeat.");
?>


Gary


Reply With Quote
  #14  
Old   
Brad Lawryk
 
Posts: n/a

Default Re: Restrict Access by Time of Day - 07-15-2004 , 10:05 AM



Thanks Gary! You have saved the day again for me! That is exactly what I needed!

Your help once again is very very appreciated. Thanks!
Brad

Reply With Quote
  #15  
Old   
Gary White
 
Posts: n/a

Default Re: Restrict Access by Time of Day - 07-15-2004 , 10:31 AM



Brad Lawryk wrote:

Quote:
Thanks Gary! You have saved the day again for me! That is exactly what
I needed!

Your help once again is very very appreciated. Thanks!

You're welcome, Brad. Don't forget to change the two variables to
reflect the actual opening and closing times.

$openat="08:00";
$closeat="16:30";


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.