Free php MySQL online booking calendar

Need a door phone or an access control device?
store.hasseb.fi

From this page you can find the source code, demo, and a manual for a simple and free online booking calendar based on php and MySQL. The calendar is suitable for many non-commersial booking purposes such as booking student or sport facilities, tools, equipment, meeting rooms, apartments, etc...

The calendar is based on php and html and uses SQL database as a data storage. Installing and configuring the calendar is easy and fast. The source code for the calendar is rather short and simple, so it is easy to make custom modification to it.

DEMO    SOURCE CODE

Installation

The online booking calendar requires a single table in an SQL database. The database settings: servername, username, password, database name, and table name are configured in the "config.php" file. After configuring the database settings in "config.php" file, run "install.php" which will create the requried table and columns to the database.

For very the basic use, it is necessary to only modify the items to be booked. The items are listed in the "index.php" file starting from row 97. To add a custom item, change the "value" field of the radio button to the name of the item. Add also a label next to the radio button.

Canceling a booking

There are two alternative php files used for booking cancellation. You can define the used php file in "index.php" file row 193. "cancel.php" will set a cancel flag to the database and corresponding booking is strikethroughed on the calendar. Another method is to use "delete.php" file to cancel the booking. This will permanently delete the booking and it will not be visible on the calendar anymore.

Security

Due to the ease of use, the calendar does not  implement a strong security. To prevent bots or robots from filling your calendar a captcha is required for every booking and cancellation. To protect the calendar from unauthorized observation or booking, security based on .htaccess and .htpasswd can be implemented.

Translating to your local language

The default language for the calendar is English. Translating the calendar to you local language can be done by following the steps below.

  1. Open the "config.php" file and translate the names of the months and week days on rows 9 and 10.
  2. Open "index.php" file and set the language of the jquery datepicker element on rows 65 and 68. Datepicker translations can be found from the folder "lang".
  3. Read through the "index.php" file and translate the text in html and php.
  4. Open file "book.php" and translate it.
  5. Open file "cancel.php" and "delete.php" and translate them.