Quickly convert your website visitors in clients! With a simple and direct form to catch all information that you need!

About

The Big Promoter Reservation was developed by Big Promoter with the intent to be used in our Limousine and General Transportation clients. As we are a company that always like to contribute with the community, we are releasing this script as open source and under the MIT license.

Therefore, fell free to use it, edit it, improve it. But remember, every script that has as base the Big Promoter Reservation must keep the MIT license, and must be released as a free tool to everyone to use.

If you have any doubt, or if you want our services to install it for you, just send us an email!



Examples

Here you can see some of the running examples of this tool:

Limousine in San Francisco - Limousine in San Francisco On the main menu on top, click on Reservation

Black Coach Limousine - Visit Web Site On the main menu on top, click on Reservation

MT Tam Limousine - Visit Web Site On the main menu on top, click on Reservation

Installing

This tool uses 4 tables to keep all reservations. To install it, you MUST edit the file index.php:

  • installwhere is the script to easily install the tables on your database
    • bp_reservations.sqlsql file with the tables structures
    • index.phpscript to install the tables

Only change lines 6 to 12.


<?php
/**
 * Fill this variables with your Database information
 */
// MySQL host
$mysql_host = '';
// Database name
$mysql_database = '';
// MySQL username
$mysql_username = '';
// MySQL password
$mysql_password = '';

After filling it with you information, save it and type in your browser:

http://yourwebsite.com/reservation/install

Ps. You must replace http://yourwebsite.com/ with the proper path to the reservation folder

You must receive a message like:

Tables imported successfully

Config

Now it is time to make the reservation look like your company. To do it, let's change the file config.ini:

  • configwhere is the file that will make major changes on the front end
    • config.inifile where you will put your company info and style
    • config_sample.inisample config file

This is the [globals] part of the config.ini:


[globals]

AUTOLOAD        = app/Controllers/;app/Models/

DEBUG           = 0

use_socket      = {{use_socket}}
db_host         = {{db_host}}
db_port         = {{db_port}}
db_name         = {{db_name}}
db_user         = {{db_user}}
db_pass         = {{db_pass}}

UI              = app/Views/
site            = {{site}}
load_view       = standard

body_bg_color   = #000
body_tx_color   = #333333
title_bg_color  = #EFEFEF
title_tx_color  = #BA0808
terms_tx_color  = #BA0808
link_tx_color   = #999999
btn_bg_color    = #BA0808
btn_tx_color    = #FFFFFF
btn_h_bg_color  = #CCCCCC
btn_h_tx_color  = #000000

id_prefix       = {{id_prefix}}
limit_ip        = {{limit_ip}}
use_captcha     = {{use_captcha}}
captcha_sitekey = {{captcha_sitekey}}
captcha_serverkey = {{captcha_serverkey}}

company_name    = {{company_name}}
company_website = {{company_website}}
company_phone   = {{company_phone}}
company_logo    = {{url to company_logo}}

email_sender    = {{email_sender}}
email_name      = {{email_name}}

email_protocol  = {{email_protocol}}
email_debug     = 0

smtp_host       = {{smtp_host}}
smtp_port       = {{smtp_port}}
smtp_scheme     = {{smtp_scheme}}
smtp_user       = {{smtp_user}}
smtp_pwd        = {{smtp_pwd}}

Explanation line by line:

Name Type Description
AUTOLOAD string It is where the Controllers and Models are. Do NOT change it! (Unless you know what you are doing!)
DEBUG integer (0, 1, 2 or 3) It define the verbosity level of the errors on your application. (Know More)
use_socket boolean (true or false) Some servers use the connection with the database using socket.
db_host string Must be the same host as set on the install.php file.
db_port integer|string Type the port of the connection on the DB (usually 3306) or insert the socket (only if use_socket is set as true)
db_name integer|string Must be the same name as set on the install.php file.
db_user integer|string Must be the same user as set on the install.php file.
db_pass integer|string Must be the same pass as set on the install.php file.
UI string It is where the Views are. Do NOT change it! (Unless you know what you are doing!)
site string Short name of your site or company
load_view string (standard or custom) It defines with header and footer will be loaded.
body_bg_color string The background color of the page body (must use # or RGB()) Used on Standard View
body_tx_color string The text color of the page body (must use # or RGB()) Used on Standard View
title_bg_color string The background color of the section title (must use # or RGB()) Also used on e-mail
title_tx_color string The text color of the section title (must use # or RGB()) Also used on e-mail
terms_tx_color string The text color of the titles on the Terms and Conditions (must use # or RGB())
link_tx_color string The text color of the all links on your page (must use # or RGB()) Used on Standard View
btn_bg_color string The background color of the buttons (must use # or RGB()) Used on Standard View
btn_tx_color string The text color of the buttons (must use # or RGB()) Used on Standard View
btn_h_bg_color string The background color of the buttons when hover(must use # or RGB()) Used on Standard View
btn_h_tx_color string The text color of the buttons when hover (must use # or RGB()) Used on Standard View
id_prefix string All reservation has a code, it sets which is the text in the beginning of this code (e.g. id_prefix = BPR_, reservation code will be something like BPR_4MG59)
limit_ip integer Maximum reservation by a single ip. You should set it to avoid bots to send multiples requests. To not use this security settings, put a high number like 999
use_captcha boolean (true or false) If you want one more security layer, set it as true. It users Google reCaptcha (Know more)
captcha_sitekey string The Site Key on Google reCaptcha site.
captcha_serverkey string The Server Key (or Secret Key) on Google reCaptcha Site.
company_name string Your company name
company_website string Your company website
company_phone string Your company phone
email_sender string Which email address will be the sender on the reservation email
email_name string Which name will be used on the reservation email
email_protocol string (smtp or mail) Which protocol will be used to send the reservation email We highly recommend you to use SMTP
email_debug integer (0, 1 or 2) It define the verbosity level of the errors on the email send.
smtp_host string Which is the SMTP host Only used if email_protocol is set to smtp
smtp_port string Which is the SMTP port Only used if email_protocol is set to smtp
smtp_scheme string (tls or ssl) Which is the SMTP security scheme Only used if email_protocol is set to smtp
smtp_user string Which is the SMTP user Only used if email_protocol is set to smtp
smtp_pwd string Which is the SMTP password Only used if email_protocol is set to smtp

Info

We made it easy to change the information that will be loaded on the reservation page.

Here you can edit the Airports that your company work with, the Credit Cards flags, the type of services that your company provide, and the vehicles type that your company have.

File structure:

  • infowhere is the files that will be loaded on reservation page
    • airport.phpthe airports that will be loaded
    • credit_card.phpthe credit card flags that will be loaded
    • load.phpfile that will sum up all other files
    • location.phpthe locations that wil be loaded
    • number.phpthe numbers that will be loaded
    • required_fields.phpthe fields that is required to send the reservation
    • type_of_service.phpthe type of services that will be loaded
    • vehicle_type.phpthe vehicles that will be loaded

Airport

To edit the airports that your company serves, you must change the file airport.php:

  • infowhere is the files that will be loaded on reservation page
    • airport.phpthe airports that will be loaded

<?php
/*
 *
 * If $airports_not_set is set as false, it won't show a not selected value
 * If $airports_not_set is set as string, it will show a not selected value
 *
 */
$airport_not_set = '--- Select Airport ---';

/*
 *
 * Airports that will be show on Reservation
 *
 */
$airports = [
    'SFO - San Francisco Airport',
    'OAK - Oakland Airport',
    'SJO - San Jose Airport',
    'BJC - B.JetCenter Oakland',
    'SRJ - San Jose JetCenter',
    'KOJ - Kaiser-Air Oak Jet',
    'ZZZ - not listed add in Special Instructions'
];

Credit Card Flags

To edit the credit cards flags that your company accepts, you must change the file credit_card.php:

  • infowhere is the files that will be loaded on reservation page
    • credit_card.phpthe credit card flags that will be loaded

<?php
/*
 *
 * If $credit_card_not_set is set as false, it won't show a not selected value
 * If $credit_card_not_set is set as string, it will show a not selected value
 *
 */
$credit_card_not_set = '---';

/*
 *
 * Credit Card that will be show on Reservation Payment
 *
 */
$credit_cards = [
    'Visa',
    'Master Card',
    'American Express',
    'Discover Card',
    'Diner\'s Club'
];

Location

To edit the locations that your company goes, you must change the file location.php:

  • infowhere is the files that will be loaded on reservation page
    • location.phpthe locations that wil be loaded

<?php
/*
 *
 * If $location_not_set is set as false, it won't show a not selected value
 * If $location_not_set is set as string, it will show a not selected value
 *
 */
$location_not_set = '--- Select Location ---';

/*
 *
 * Vehicle Type that will be show on Reservation
 *
 */
$locations = [
    1 => 'Airport',
    2 => 'Hotel',
    3 => 'Other Locations'
];

This is an important are of the reservation system. Please, edit it with all attention possible.

If you want to do a deep change, you will need to update/delete/include files on:

  • app
    • View
      • reservation
        • _partials
          • _location
            • airport.htm
            • hotel.htm
            • location.htm
            • other_location.htm

Number

On passanger number and luggage number, we display a set of numbers. If you want to change this set, you need to change the file number.php:

  • infowhere is the files that will be loaded on reservation page
    • number.phpthe numbers that will be loaded

/*
 *
 * If $number_not_set is set as false, it won't show a not selected value
 * If $number_not_set is set as string, it will show a not selected value
 *
 */
$number_not_set = '---';

/*
 *
 * Numbers that will be show on Reservation
 *
 */
$numbers = [
    '0',
    '1',
    '2',
    '3',
    '4',
    '5',
    '6',
    '7',
    '8',
    '9',
    '10',
    '11-20',
    '21-30',
    '31-40',
    '41-50',
    '51-60',
    '61-70',
    '71-80',
    '81-90',
    '91-100',
    '100+',
];

Type of Service

Just update the file type_of_service.php to change the list of services that your company provides:

  • infowhere is the files that will be loaded on reservation page
    • type_of_service.phpthe type of services that will be loaded

/*
 *
 * If $type_of_service_not_set is set as false, it won't show a not selected value
 * If $type_of_service_not_set is set as string, it will show a not selected value
 *
 */
$type_of_service_not_set = '--- Select a Service ---';

/*
 *
 * Type of Service that will be show on Reservation
 *
 */
$types_of_service = [
    'Airport Transportation',
    'Sporting',
    'Wedding',
    'Prom',
    'Bachelor Party',
    'Bachelorette Party',
    'City Transfer',
    'Night on the Town',
    'Birthday',
    'Concert',
    'Shopping',
    'Business Travel',
    'Napa Valley Tour'
];

Vehicle Type

To update your fleet, just edit eh file vehicle_type.php:

  • infowhere is the files that will be loaded on reservation page
    • vehicle_type.phpthe vehicles that will be loaded

/*
 *
 * If $vehicle_type_not_set is set as false, it won't show a not selected value
 * If $vehicle_type_not_set is set as string, it will show a not selected value
 *
 */
$vehicle_type_not_set = '--- Select a Vehicle ---';

/*
 *
 * Vehicle Type that will be show on Reservation
 *
 */
$vehicle_types = [
    'Lincoln Town Car - 3 Passenger',
    'Stretch Limousine - 6 Passenger',
    'Stretch Limousine - 8 Passenger',
    'Stretch Limousine - 10 Passenger',
    'SUV Escalade - 6 Passenger',
    'Hummer Limo - 18 Passenger',
    'White Limousine - 8 Passenger',
    'Navigator Limousine - 14 Passenger',
    'Lincoln MKT Town Car - 4 Passenger',
    'BMW 750Li - 4 Passenger',
    'Mercedes-Benz S550 - 4 Passenger'
];

Required Fields

To avoid incomplete reservations, we set some fields as required out of the box. But you can change it, as you want. Just inser the informations on the file required_fields.php:

  • infowhere is the files that will be loaded on reservation page
    • required_fields.phpthe fields that is required to send the reservation

As this is a long file, we won't have this file here. But you should edit it following the same validation rules from the jQuery Validation plugin (Know More)

Advanced

.htaccess

The .htaccess is set to work on /reservation/ folder. If you want to run it on a different folder, change the line 8 with the proper path.


# Enable rewrite engine and route requests to framework
RewriteEngine On

# Some servers require you to specify the `RewriteBase` directive
# In such cases, it should be the path (relative to the document root)
# containing this .htaccess file
#
RewriteBase /reservation/

RewriteRule ^(tmp)\/|\.ini$ - [R=404]

RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Composer

To make it easy, we already included on the zip file the google/recaptha. But if you want to try it with an updated version. On the command line, just type:

composer update

Third Part

Follow below all third part code that we used on Big Promoter Reservation:

Fat Free Framework - A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

PHPMailer - A full-featured email creation and transfer class for PHP

reCaptcha - reCAPTCHA is a free CAPTCHA service that protect websites from spam and abuse.

.validate - Form validation with jQuery

License

MIT License

Copyright (c) 2016 Big Promoter

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.