URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: uReserve_general
Thread Number: 34
[ Go back to previous page ]

Original Message
"Not allow same day reservations"

Posted by Don Cody [dcody@gsd.co.contra-costa.ca.us] on at 01:50 PM
Is there an easy way to make a modification that will keep people from making a reservation on the current day (and in the past too, for that matter)? Maybe just a pop up box with a short message in place of the Reserve box if they click on a date that is less than or equal to the current date.

I've already tweaked the script a little so I'm not afraid to do that.
Any help would be appreciated. Thanks.


Table of contents

Messages in this discussion
"RE: Not allow same day reservations"
Posted by Bill Weiner on at 07:11 AM
Ok, try adding this modification:

STEP 1: Make a backup of your current ureserve.pl script... just in case.

STEP 2: Open your ureserve.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

if ($res_start_time >= $res_end_time)

STEP 4: Immediately BEFORE the specified line, add these 14 lines:

$now_seconds = time;
if ($current_seconds < $now_seconds)
{
&missing_input("Invalid Reservation Date","Please select a date no earlier than tomorrow.");
}
else
{
$date_str1 = &get_exact_date($current_seconds);
$date_str2 = &get_exact_date($now_seconds);
if ($date_str1 eq $date_str2)
{
&missing_input("Invalid Reservation Date","Please select a date no earlier than tomorrow.");
}
}

STEP 5: Save the ureserve.pl script... as TEXT if your editor asks... and try it out!


"same day appointments"
Posted by Don [dcody@gsd.co.contra-costa.ca.us] on at 04:25 PM
That worked great! Thanks for your help and quick response.