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
Restrict reservation.

Knowledge Base Lobby : uReserve Support Conference : General Questions
Nov-21-17 02:34 PM EST
Original Message
Restrict reservation.
Author Ed on 04-11-2002 at 22:11 (EST)
Hello,
Is there a way for me as admin to restrict
reservations to only 4 weeks out instead of
indefinite. People tend to forget about their
reservations if it is too far out. However, if a
request for 2 months out comes into
me, I would like to be able to schedule it.
Thanks
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Restrict reservation. Bill Weiner, 2002-04-12 04:57:11 (1)
            restricting Ed, 2002-04-12 09:40:22 (2)
                 RE: restricting Bill Weiner, 2002-04-16 05:27:30 (3)

Messages In This Discussion
         1. RE: Restrict reservation.
        Author Bill Weiner on 04-12-2002 at 04:57 (EST)
There's not really an easy way to restrict the reservations to within 4 weeks, but here are some instructions on how you could make a simple modification to the script in order to accomplish that:

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:

elsif ($command eq "goto_next_week")

STEP 4: About 3 lines down from there you will see this line:

$goto_seconds = $form_text{'seconds'};

Immediately AFTER that line, try adding these four lines:

if (($goto_seconds - time) > ($SECONDS_PER_DAY * 28))
{
&display_message("Out of Range","The reservation schedule is restricted to 4 weeks in advance.");
}

STEP 5: Do a search on the following line:

elsif ($command eq "goto_date")

STEP 6: About 4 lines down from there you will see this line:

$goto_seconds = &get_date_seconds($goto_date);

Immediately AFTER that line, try adding those same four lines:

if (($goto_seconds - time) > ($SECONDS_PER_DAY * 28))
{
&display_message("Out of Range","The reservation schedule is restricted to 4 weeks in advance.");
}

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

The result of this modification should be that visitors can not view/make reservations further than 4 weeks in the future.

NOTE: When adding the code above, the &display_message lines should all be on one line... ie. don't let it wrap around to the next line.
TABLE OF CONTENTS
                 2. restricting
                Author Ed on 04-12-2002 at 09:40 (EST)
I tried that and it does what you say thanks.

Just wondering tho can I as admin surpass that and make a schedule for 2 or 3 months out if a special request is made.
Thanks again for your quick responces!

TABLE OF CONTENTS
                         3. RE: restricting
                        Author Bill Weiner on 04-16-2002 at 05:27 (EST)
The easiest way to keep the restriction modification that you made above... while allowing the admin to surpass that restriction... would be to just install a second copy of the ureserve.pl script... one in which just the admin would use. Here's how:

STEP 1: Rename the original (unmodified) ureserve.pl script to something like "ureserve_admin.pl".

STEP 2: Configure/install the "ureserve_admin.pl" script as you did with the regular ureserve.pl script.... and be sure that the $data_directory setting in configuration question #6 maps to the same "data" directory that your modified "ureserve.pl" script uses.

STEP 3: And just have the administorator always use this second script to make reservations and do other admin stuff.

Yes, this is not totally fool-proof in that if a regular website visitor guesses the name/URL of the second admin script... then they would be able to make reservations outside of the 4 week modification that you made to the public "ureserve.pl" script... but that would be very unlikely.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.