RE: [PHP] Time release type question
This is an example of what I'm talking about. Week 1 pages would be visible starting June 3rd Week 2 pages would be visible starting June 10th Week 3 pages would be visible starting June 17th Use a database. Store information about each file in the database, including a release date. Then create navigation links based on reading data out of your database using that release date as one of your criteria. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time release type question
On Wednesday 29 May 2002 11:52, Dr. Indera wrote: I am in the planning stage of building an online course room. Each week I need to upload pages for that weeks lesson and assignments. What I want to know is if there is a way for me to have all 8 weeks of the course pages created and upload them all at one time, but only have certain pages 'visible' based on the current date. This is an example of what I'm talking about. Week 1 pages would be visible starting June 3rd Week 2 pages would be visible starting June 10th Week 3 pages would be visible starting June 17th Am I missing something? It's just a simple matter of checking the current date and if it exceeds defined threshold (say June 3rd) then display the page otherwise display an error message or redirect or whatever. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* I have a very strange feeling about this... -- Luke Skywalker */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time release type question
I think that is right Jay, you can use mktime() to change the date into unix time and then create the if statement if ((mktime([current])) == (mktime([date of assignment])) { echo link to assignment } something along those lines.. you can easily check it by setting the system clock forward Jule On Wednesday 29 May 2002 00:14, you wrote: On Wednesday 29 May 2002 11:52, Dr. Indera wrote: I am in the planning stage of building an online course room. Each week I need to upload pages for that weeks lesson and assignments. What I want to know is if there is a way for me to have all 8 weeks of the course pages created and upload them all at one time, but only have certain pages 'visible' based on the current date. This is an example of what I'm talking about. Week 1 pages would be visible starting June 3rd Week 2 pages would be visible starting June 10th Week 3 pages would be visible starting June 17th Am I missing something? It's just a simple matter of checking the current date and if it exceeds defined threshold (say June 3rd) then display the page otherwise display an error message or redirect or whatever. -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time release type question
actually that should be for ($n = 1; $n = $number_of_assignments; $n++) { if (mktime($current) = mktime($assignment[$n]) { echo assignment[$n]br\n; } } Jule On Wednesday 29 May 2002 00:31, Jule wrote: I think that is right Jay, you can use mktime() to change the date into unix time and then create the if statement if ((mktime([current])) == (mktime([date of assignment])) { echo link to assignment } something along those lines.. you can easily check it by setting the system clock forward Jule On Wednesday 29 May 2002 00:14, you wrote: On Wednesday 29 May 2002 11:52, Dr. Indera wrote: I am in the planning stage of building an online course room. Each week I need to upload pages for that weeks lesson and assignments. What I want to know is if there is a way for me to have all 8 weeks of the course pages created and upload them all at one time, but only have certain pages 'visible' based on the current date. This is an example of what I'm talking about. Week 1 pages would be visible starting June 3rd Week 2 pages would be visible starting June 10th Week 3 pages would be visible starting June 17th Am I missing something? It's just a simple matter of checking the current date and if it exceeds defined threshold (say June 3rd) then display the page otherwise display an error message or redirect or whatever. -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time release type question
hi jule, thank you for the script and don't worry about the # of posts. i admire your dedication. indera Jule wrote: I really should be more clear on my scripts I'm sorry $assignment[1][date] = date(); // date in mktime format see www.php.net $assignment[2][date] = date(); $assignment[3][date] = date(); $assignment[4][date] = date(); $assignment[5][date] = date(); $assignment[1][assignment] = pg. 1-5; $assignment[2][assignment] = ; $assignment[3][assignment] = ; $assignment[4][assignment] = ; $assignment[5][assignment] = ; $number_of _assignments = count($assignment); for ($n = 1; $n = $number_of_assignments; $n++) { if (mktime($current) = mktime($assignment[$n][date]) { echo $assignment[$n][assignment]br\n; } } that should do it. sorry for the many posts, Jule On Wednesday 29 May 2002 00:45, Jule wrote: actually that should be for ($n = 1; $n = $number_of_assignments; $n++) { if (mktime($current) = mktime($assignment[$n]) { echo assignment[$n]br\n; } } Jule On Wednesday 29 May 2002 00:31, Jule wrote: I think that is right Jay, you can use mktime() to change the date into unix time and then create the if statement if ((mktime([current])) == (mktime([date of assignment])) { echo link to assignment } something along those lines.. you can easily check it by setting the system clock forward Jule On Wednesday 29 May 2002 00:14, you wrote: On Wednesday 29 May 2002 11:52, Dr. Indera wrote: I am in the planning stage of building an online course room. Each week I need to upload pages for that weeks lesson and assignments. What I want to know is if there is a way for me to have all 8 weeks of the course pages created and upload them all at one time, but only have certain pages 'visible' based on the current date. This is an example of what I'm talking about. Week 1 pages would be visible starting June 3rd Week 2 pages would be visible starting June 10th Week 3 pages would be visible starting June 17th Am I missing something? It's just a simple matter of checking the current date and if it exceeds defined threshold (say June 3rd) then display the page otherwise display an error message or redirect or whatever. -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php