LoCal
The Equipment Reservation and User Management System
Developed by the Laboratory for Optical and Computational Instrumentation
for more information contact eliceiri@facstaff.wisc.edu
INTRODUCTION:
One of the most popular and yet unheralded uses of the web has been for online booking and reservation of resources. These resources are widely varied; anywhere from a professor reserving a classroom for a lecture, a student requesting that a library book be held, or a traveler checking availability of a flight. The key to the success of this kind of use, is its inherent simplicity. The whole purpose is for accessibility, the same way the WWW gives real-time access to information, it also can give real-time access to resources, be it booking of personnel, instrumentation or other resources.
One particular useful implementation of online booking, is web-based reservation systems for scientific instrumentation. Scientific Instrumentation can be costly to purchase and maintain and thus is often only available in centralized facilities. The Internet has provided real accessibility to these resources with HTML pages describing the facility and the equipment available, and in some cases remote use of the instrument itself. Web-based reservations have become another powerful way to improve accessibility to a instrument. There are several programs and methodologies available for microscope booking systems. Described on the pages within is the system we developed. As well links to other systems are provided.
1. Installation
2. Usage1.3.1 Software Installation
1.3.2 Database Configuration
1.3.3 Software Configuration
1.3.4 Software Customization
1.3.5 Update Default Values
1.1 Platforms
Currently the only supported platform is Linux. Linux distribution LoCal has been tested on Debian 4.0.1-2.
1.2 Required Packages
- PHP 4
- All supporting PHP packages such as php_mod, php_mysql
- MySQL 4.1.15 or greater
- html2ps 1.0 beta 5 or greater
- And all other dependencies for the above packages (perl, etc.)
1.3 Procedure1.3.1 Software Installation
Although we are using PHPLib, be aware that we have added additional classes, bug workarounds, etc. Be aware that we are also NOT using the user database schema provided by PHPLib.
- Download and install all of the required packages that are listed in section 1.2
- Download the LoCal .tar file.
- Untar the file in the directory parallel to your root html directory (eg. /var/www ). The following directories will be installed:
- phplib - This directory contains a customized version of PHPLib v7.4.
- local - This directory contains the LoCal program itself.
- local-temp - This directory contains docs and files you may need during installation. After finishing the installation, you should delete the local-temp directory.
1.3.2 Database Configuration
Note: with all the MySQL commands, we assume that you are familiar with MySQL and already have a working account that requires a password. The databases are set up by running MySQL scripts, located in the local-temp folder. It is assumed that you do not currently have databases with the same names as the databases that the script installs.
To run the mysql script, run: mysql -p < scriptfile.sql
where scriptfile.sql is the name of the corresponding script file
Install the following MySQL databases, with the corresponding MySQL scripts:Make sure you have a database user id that PHP can use, that has appropriate privileges to access the databases. Both the userdb and local_calendar databases need INSERT, UPDATE, DELETE privileges, and the local_calendar database needs additional DROP AND CREATE permissions.
- Calander Database - local_calendars:
mysql -p < createdb.sql- User Database - userdb:
mysql -p < createudb.sql- Session Database - sessions:
mysql -p < create_database.mysql1.3.3 Software Configuration
(Using your favorite text editor, edit the following files, in the following ways)
- local/config.php:
- Set the appropriate values for the configuation variables. Descriptions of the variables are given in the file.
- Include an uncommented line that reads: "require($_PHPLIB['libdir'] . 'db_mysql.inc');"
- Make sure the the variable $_PHPLIB["libdir"] is pointing to where you installed PHPLib
- phplib/local4.inc:
- Set the appropriate information for accessing your databases.
1.3.4 Software Customization
(Using your favorite text editor, edit the following files)
- local/index.php: Edit this file to customize the splash screen for LoCal. A sample has been provided for you.
- local/main.php: Edit this file to customize the user home page (eg, instead of displaying "Welcome to the LOCI Group Calendar", etc.).
- phplib/header.inc: Edit this file to customize the header. We do ask that you keep the LoCal name in the upper left-hand corner.
- phplib/footer.inc: Edit this file to customize the footer.
1.3.5 Update Default ValuesThe default password for the "sysadmin" user (the first and most "privileged" user account in the system by default) is "root". Please change the password by logging into the admin interface (yourhost.com/local/admin). If you need help logging in, please read the tutorial (see below). We hope we are making the importance of this step obvious enough by separating this into its own section. Please update the sysadmin values (which includes the default password,default email, etc.)