uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Reservation Parameters

Knowledge Base Lobby : uGolf Support Conference : Configuration Questions
Nov-21-17 12:32 PM EST
Original Message
Reservation Parameters
Author jordanl on 06-08-2003 at 16:54 (EST)
How can I prevent people from reserving more
than five days in advance but allow the administrator to be able to
go as far as she wants?
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Reservation Parameters Bill Weiner, 2003-06-10 06:43:10 (1)
            Reservation Parameters JordanL, 2003-06-10 14:22:27 (2)
                 RE: Reservation Parameters Bill Weiner, 2003-06-12 06:38:34 (3)
                      Tried with a slight difference... no luck. :-) MJI Brower, 2003-06-13 15:58:40 (4)
                      Reservation Parameters jordanl, 2003-06-13 23:55:02 (5)
                           RE: Reservation Parameters Bill Weiner, 2003-06-24 06:54:34 (6)

Messages In This Discussion
         1. RE: Reservation Parameters
        Author Bill Weiner on 06-10-2003 at 06:43 (EST)

You can try modifying the "create_reservation_form" of the ugolf.pl script as described below:

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

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

STEP 3: Do a search on the following line of code:

sub create_reservation_form

This will get you to the start of the subroutine that creates the reservation form.

STEP 4: Do a second search on the following line of code:

$password = "";

STEP 5: Immediately AFTER that line of code, add these lines of code:

if ($num_seconds > ((time) + ($SECONDS_PER_DAY * 5)))
{
&missing_input("Invalid Reservation Date","Reservations may only be made up to 5 days in advance.");
}

STEP 6: Save the script...as TEXT if your editor asks... and try it out!
TABLE OF CONTENTS
                 2. Reservation Parameters
                Author JordanL on 06-10-2003 at 14:22 (EST)
Bill,
I have entered the code as perscribed but was still able to make reservations more than five days in advanced.
If it is not a problem could you check out the site?
http://www.cedarlakegolf.com/cgi-bin/ugolf.pl

I appreciate your help.
Thanks
TABLE OF CONTENTS
                         3. RE: Reservation Parameters
                        Author Bill Weiner on 06-12-2003 at 06:38 (EST)
My bad. I should have told you to use the variable "$g_seconds" instead of "$num_seconds". So updating those previous instructions:

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

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

STEP 3: Do a search on the following line of code:

sub create_reservation_form

This will get you to the start of the subroutine that creates the reservation form.

STEP 4: Do a second search on the following line of code:

$password = "";

STEP 5: Immediately AFTER that line of code, add these lines of code:

if ($g_seconds > ((time) + ($SECONDS_PER_DAY * 5)))
{
&missing_input("Invalid Reservation Date","Reservations may only be made up to 5 days in advance.");
}

STEP 6: Save the script...as TEXT if your editor asks... and try it out!
TABLE OF CONTENTS
                                 4. Tried with a slight difference... no luck. :-)
                                Author MJI Brower on 06-13-2003 at 15:58 (EST)
Hi,

I was trying to alter this so that users couldn't make reservations less than five minutes before the reservation time, but had no luck. Here's how I changed it:

if ( time < ($g_seconds - ($SECONDS_PER_MINUTE * 5)) )
{
&missing_input("Invalid Reservation Date","Reservations must be made more than five minutes in advance.");
}

...But the reservation still gets made. Any suggestions?

Thanks!

Molly
TABLE OF CONTENTS
                                 5. Reservation Parameters
                                Author jordanl on 06-13-2003 at 23:55 (EST)
Bill, thanks that one worked well except for one minor detail.
The click Here to go back link doesn't work.
I was thinking maybe it should be a close window link instead.
What do you think.
Can you change that portion of the code to close the reservarion form popup window?

Thanks!
TABLE OF CONTENTS
                                         6. RE: Reservation Parameters
                                        Author Bill Weiner on 06-24-2003 at 06:54 (EST)
Try changing:

&missing_input("Invalid Reservation Date","Reservations must be made more than
five minutes in advance.");

In the above modification, to:

&display_message("Invalid Reservation Date","Reservations must be made more than
five minutes in advance.");

And that should do it!
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.